Zendesk outgoing
replica.key = issue.key replica.assignee = issue.assignee replica.reporter = issue.reporter replica.summary = issue.summary replica.description = issue.description replica.type = issue.type replica.labels = issue.labels replica.attachments = issue.attachments replica.comments = issue.comments replica.status = issue.status replica.priority = issue.priority replica.customFields."Key" = issue.customFields."Key"
ADO incoming
//debug.error("hello") if(firstSync){ workItem.typeName = nodeHelper.getIssueType(replica.type?.name)?.name ?: "Task"; } workItem.labels = replica.labels workItem.summary = replica.summary workItem.description = replica.description workItem.attachments = attachmentHelper.mergeAttachments(workItem, replica) workItem.comments = commentHelper.mergeComments(workItem, replica) def PriorityMap = [ "urgent" : "1 - Critical", "high" : "2 - High", "normal" : "3 - Medium", "low" : "4 - Low", ] def targetPriority = PriorityMap[replica?.priority?.name] ?: "1 - Critical" workItem."Microsoft.VSTS.Common.Severity" = targetPriority //many-to-one def remoteKey = replica.customFields."Key"?.value if(remoteKey){ boolean correct = false; def localWorkItem = httpClient.get("/_apis/wit/workitems/${remoteKey}?api-version=6.0", correct) workItem.id = localWorkItem?.id return; }