Originally asked by Mathieu Lepoutre on 11 May 2022 (original question)
How can I assign multiple support tickets which are created in Zendesk, to a single ticket in Azure Devops?
Originally asked by Mathieu Lepoutre on 11 May 2022 (original question)
How can I assign multiple support tickets which are created in Zendesk, to a single ticket in Azure Devops?
Answer by Mathieu Lepoutre on 11 May 2022
To do this, you would need to populate a customField value in Zendesk, with the desired workItem from Azure Devops.
After making a custom Field called “Key”, we populate it with the workItem number.
In the outgoing sync in Zendesk, please write this line of code:
//Send a Custom Field value
replica.customFields."Key" = issue.customFields."Key"
Now to the other side, we want the multiple support tickets (in this case) to be exalated to a single workItem.
We will do this through a REST API call. After populating the REST API with the field of the Zendesk Custom Field, we can pick up the id of the WorkItem.
In the incoming script in Azure Devops, add these lines of code;
def remoteKey = replica.customFields."Key"?.value
//debug.error("${remoteKey}")
if(remoteKey){
boolean correct = false;
def localWorkItem = httpClient.get("/_apis/wit/workitems/${remoteKey}?api-version=6.0", correct)
workItem.id = localWorkItem?.id
return;
}
The incoming processor is getting the local workItem id out of the call, and assigning it to the workItem id.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.