How to update work item of Azure Dev ops using Azure dev ops spoke

Krishna Chaitan
Tera Expert

Hi, we are trying to build a flow, where it needs to update work item in Azure dev ops. We are using Azure dev ops integration hub spoke. We have existing flow which is creating work item. So whenever any comments added to ServcieNow ticket it needs to update the respective workitem. 

 

We are using update work item spoke, but challenge is we are not getting additional fields (field in Azure dev ops work item).  Also, I'm wondering project is not required?

 

KrishnaChaitan_0-1697569721192.png

 

5 REPLIES 5

Mathieu Lepoutr
Mega Guru

Hi Krishna

 

I believe this is solvable by following these steps:

  • Identify the REST API endpoint for updating work items in Azure DevOps.
  • Construct a custom JSON payload that includes the fields you want to update and their new values.
  • Use the "Send HTTP Request" or similar action in ServiceNow Flow Designer to send a PATCH request to the Azure DevOps API with the custom payload.

This should solve it.

 

If you don't want to go this route, please have a look at Exalate.

It is an integration solution that works super fast in my opinion. It provides robust syncronization capabilities and you can granuarly decided what you want to send to the other side and how you want to apply receiving information. I have been using it for quite a while and it instantly jumped in my thoughts reading this post. Hope to have helped you

WinglessRobin
Tera Contributor

Hi There,

Having the same issue here, seems the integration is expecting a static work item number (as opposed to a data pill) as it appears to change the available fields etc depending on the work item type.

Is anyone able to expand on steps for this?

  • Identify the REST API endpoint for updating work items in Azure DevOps.
  • Construct a custom JSON payload that includes the fields you want to update and their new values.
  • Use the "Send HTTP Request" or similar action in ServiceNow Flow Designer to send a PATCH request to the Azure DevOps API with the custom payload.

Reluctant to use Exalate seeing as we have paid for the IntegrationHub and having to justify the cost of a separate service to accomplish what was advertised with IH would not go down particularly well.

hmalhotra22
Tera Contributor

Hi krishna, did you manage to solve this? If yes, then can you please help with a solution.

jehova_honey
ServiceNow Employee
ServiceNow Employee

Additional Fields is a dynamic input which depends on Work Item ID. It uses Work Item ID to call another action which gets the list of additional fields. If you use data pill for Work Item ID, it doesn't have any value while creating/updating flow to fetch the additional fields. 
You need to use a data pill for additional fields input also.  Drag and drop any string field with an encoded query on top of the additional fields, even if it's greyed out.
Use the 'Generate Encoded Query' action from the Utility Actions Spoke to form the encoded query.

Refer to the attached screenshot for guidance on providing input values (key-value pairs) for the above action. Ensure you provide the correct names for the keys, which can be found by running the 'Get Editable Fields' action.

Refer to this KB for detailed steps for the same problem in Jira spoke. https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0818189