Azure Pipelines ServiceNow App - How to provide custom fields in additional parameters

957 Views Asked by At

We are a consumer of both Microsoft Azure and ServiceNow. We’ve installed the Azure Pipelines add-on to ServiceNow and the ServiceNow Change Management add-on to Azure.

We are setting up in the connection between Azure and ServiceNow, and initially had success – the Azure pipeline is initiated a ServiceNow change request, waiting for the implementation status to be set, and then continuing with the pipeline.

The issue we are encountering is with mapping of additional fields:

In Service Now, for example, we have 2 fields. One is labeled “Business Service” and one is labeled “Sub Category”. The names of these fields are “business_service” and “u_sub_category” (this is a user created field in ServiceNow). The Microsoft documentation states that all fields must be configured in Azure with a u_ prefix. We initially could not get either field to map over to ServiceNow, but when we adding u_ to business_service (so set it up in Azure as u_business_service), it worked – the value successfully carried over to ServiceNow.

We cannot get Sub Category to work. We tried u_u_sub_category and it doesn’t work either. ServiceNow doesn’t allow you to create user fields without the prefix of u_, so re-creating Sub Category as just sub_category is not an option.

How do we get user created fields in ServiceNow mapped correctly in Azure? If the name in ServiceNow is u_anything, setting Azure to map to u_anything or u_u_anything does not work.

NOTE: there is an OOTB field in ServiceNow named “risk_impact_analysis”. This field also does no work – using u_risk_impact_analysis or just risk_impact_analysis does not flow to ServiceNow.

Your assistance is greatly appreciated!!

Reference: ServiceNow store: https://store.servicenow.com/$appstore.do?ref=nav&instanceid=fb4f685ddbfc33c049eac59705961906#!/store/application/fa788cb5dbb5630040669c27db961940/3.150.1?referer=sn_appstore_store.do%23!%2Fstore%2Fsearch%3Fq%3Dpipeline Microsoft documentation: https://learn.microsoft.com/en-us/azure/devops/pipelines/release/approvals/servicenow?view=azure-devops Azure Marketplace: https://marketplace.visualstudio.com/items?itemName=ms-vscs-rm.vss-services-servicenowchangerequestmanagement

1

There are 1 best solutions below

0
Nishu Bansal On

Azure Pipelines ServiceNow application inserts data in ServiceNow using Import sets. As a part of this application, we have created an import set for change_request table and we have added a Transform map to add mapping of Import set table (Source) fields to change_request table (Target) fields. For any new field which user has created, an entry in the Import set table and Transform map will not be present so no matter how you specify in “Additional parameters” without having an entry in import set and Transform map it will not work.

Please do the following to resolve the issue:
1. Please check fields for which you are facing issue in Import set table via this link - https://<Instance-name>.service-now.com/v_ws_editor.do?sysparm_query=name=x_mioms_azpipeline_change_request_import
2. Check field is present in the import set table or not. If Field is not present then please follow steps given in the App documentation to add a field in an Import set table and transform map.
3. If Field is present, then whatever is the name of the field present in the table give that name in Additional properties. For example – If you see for Template ID name is template_id and for Active it is u_active. The idea is whatever name is given in an import set table that should be given in additional properties.