Originally asked by Jeff Roncone on 14 April 2023 (original question)
I am syncing Zendesk and AZDO and i am having an issue with the Areapath being overwritten in Azdo to the default areapath. I would like to leave the areapath in Azdo alone. Does anyone know how i can do this. I was trying this line in the Azdo incoming. Which is amking an API call and sets the areapath to the exiting areapath
def remoteKey = replica.customFields."key"?.value
if(remoteKey){
boolean correct = false;
def localWorkItem = httpClient.get("/_apis/wit/workitems/${remoteKey}?api-version=7.0", correct)
//debug.error("${localWorkItem}")
//if(localIssue == null) throw new com.exalate.api.exception.IssueTrackerException("Issue with key "+remoteKey+" was not found")
workItem.key = localWorkItem?.id
workItem.id = localWorkItem?.id
workItem.areaPath = localWorkItem?.System.AreaPath
return;
}
But it still changes the areapath