Hello,
From Jira to Devops, to send the Description i use
replica.description = nodeHelper.getHtmlField(issue, "description")
From DevOps to jira, what specific code do i need to use, in my Outgoing from Dev i have normal
replica.description = workItem.description
Should i have some specific code to receive this into my Jira Description, since now im getting all in Jira without format since Jira is not reading HTML
Thanks
Dear @Lautaro
Please try this:
ADO Outgoing sync script:
replica.description = workItem.description
replica.comments = workItem.comments
ADO Incoming sync script:
workItem.description = replica.description
workItem.comments = commentHelper.mergeComments(workItem, replica)
JC outgoing sync script:
replica.description = nodeHelper.getHtmlField(issue, “description”)
replica.comments = nodeHelper.getHtmlComments(issue)
JC incoming sync script:
issue.description = nodeHelper.toMarkDownFromHtml(replica.description)
issue.comments = nodeHelper.toMarkDownComments(commentHelper.mergeComments(issue, replica))
Thank you and have a great day.
Kind regards,
Mathieu Lepoutre
Hello! Thanks for the reply.
Im getting the description better formatted now, however it still missing colors, image format and so on, not everything is coming properly.
Dont know how to share images here to show
Dear Lautaro
Please use this code for color mappings to work.
Change
replica.description = nodeHelper.getHtmlField(issue, “description”)
To
def desc1 = nodeHelper.getHtmlField(issue, “description”)
desc1 = desc1
.replaceAll(/\{color:(#[0-9a-fA-F]{6}|[a-zA-Z]+)\}/, '<span style="color:$1">')
.replaceAll(/\{color\}/, '</span>')
replica.description = desc1
(In the outgoing sync).
For the images, right now this could be to a limitation of the API. I will have a deeper look into this.
Thank you.
Kind regards,
Mathieu Lepoutre