Resolution notes in ServiceNow when Jira Ticket is updated to "DONE"

Originally asked by Jonathan Gilbert on 15 January 2021 (original question)


Morning

How do you get around the issue of when a ticket in Jira is updated to “DONE”, which is mapped to ServiceNow as “RESOLVED”. ServiceNow has a field, where you must enter resolution notes. How do you populate this field at this point from Jira, as Jira only has “Additional” comments,


Answer by Jonathan Gilbert on 12 February 2021

Hi Everyone

The solution to this is this the below line of script on the “Incoming Sync” in ServiceNow. “close_notes” is our field in Servicenow that needed updating

entity.close_notes = replica.comments.size() > 0 ? replica.comments.last().body : “”

This solution was provided by Kamal from Idalko , thanks for that!