Answer by Ariel Aguilar on 21 March 2023
Hi there,
Hope this helps!
Components sync from Jira to ADO:
Jira Outgoing:
replica.components = issue.components
Azure Incoming:
workItem."Components field" = replica.components?.first().name
Epic Parent child relationship Jira to ADO:
Jira Outgoing:
replica.customFields."Epic Link" = issue.customFields."Epic Link"
Azure Incoming:
if (replica.customFields."Epic Link".id){
def localParent = syncHelper.getLocalIssueKeyFromRemoteId(replica.customFields."Epic Link".id.toLong())
if(localParent){
workItem.parentId = localParent.id
}
}
Clean format Description, Summary, Comments or customFields Jira to ADO:
Jira Outgoing:
replica.description = nodeHelper.getHtmlField(issue, "description")
replica.summary = nodeHelper.getHtmlField(issue, "summary")
replica.comments = nodeHelper.getHtmlComments(issue)
replica."MyCustomField" = nodeHelper.getHtmlField(issue, "customfield_10111")
Azure Incoming:
workItem.description = replica.description
workItem.summary = replica.summary
workItem.comments = commentHelper.mergeComments(workItem, replica)
workItem."Azure Field" = replica."MyCustomField"
Clean format Description, Summary, Comments or customFields ADO to Jira:
Azure Outgoing:
replica.summary = workItem.summary
replica.description = workItem.description
replica.comments = nodeHelper.stripHtmlFromComments(workItem.comments)
replica."Azure Field" = workItem."Azure Field"
Jira Incoming:
import com.exalate.transform.HtmlToWiki
HtmlToWiki htw = new HtmlToWiki()
issue.summary = htw.transform(replica.summary)
issue.description = htw.transform(replica.description)
issue.comments = commentHelper.mergeComments(issue, replica)
issue.customFields."Jira Field".value = replica."Azure Field"?.value
Sync Assignee Jira to ADO, auto assign?
You might need to check if there is any automation in place or misconfiguration. You may comment out the assignee field to see if the behaviour persists. If it does, then ADO is the responsible.
//workItem.assignee = replica.assignee
Sync Custom Field Multi Select Jira to areaPath ADO:
Outgoing Jira
replica.customFields."Multi" = issue.customFields."Multi"
Incoming Azure
def multiMap = ["Alpha":"WebPlatform\\Alpha",
"Beta":"WebPlatform\\Beta",
"Gama":"WebPlatform\\Gama"]
areaOption = replica.customFields."Multi".value?.collect {it -> it?.value}
workItem.areaPath = multiMap[areaOption]
Kind regards,
Ariel