I have Jira assignee syncing to ServiceNow assigned_to with this code:
entity.assigned_to = replica.assignee?.email
What I am trying to do is: When the Jira card status is changed to ‘Done’ the ServiceNow incident should be changed to ‘Resolved’ with a resolution note and the resolved_by user should be the same as the Jira assignee. The ServiceNow status and resolution note are working fine but the resolved_by user is being set to ‘Exalate Integration’.
This code is in SN incoming script:
if(replica.status?.name == “Done”){
entity.state = “Resolved”
entity.close_code =“Solved (Work Around)”
def defaultResolution = "Done on Jira cloud. No resolution entered. Card " + replica.key
def Resolution = replica.customFields?.“Resolution Notes”?.value ?: defaultResolution
entity.close_notes = Resolution // replica.customFields?.“Resolution Notes”?.value
//Nov 2024 MVanOstrand - added resolved_by to sync
entity.resolved_by = replica.resolved_by?.email
This code is in Jira outgoing script:
replica.assignee = issue.assignee
replica.resolved_by = issue.assignee
I have capture the local and remote replica data and will attach if I can figure out how.