In this article, we describe how to sync the status between Jira and ServiceNow instances.
You need to configure the mapping between statuses on both sides.
Jira to ServiceNow sync
Jira Outgoing sync rules
Send local status to the remote side:
replica.status = issue.status
Servicenow Incoming sync rules
Set the local status based on the received status value from the remote side:
def statusMap = [ // "remote status name": "local status name" "To Do" : "New", "In Progress" : "Working on it", "Done" : "Canceled" ] def remoteStatusName = replica.status.name entity.state = statusMap[remoteStatusName] ?: remoteStatusName
ServiceNow to Jira sync
Servicenow Outgoing sync rules
replica.state = entity.state
Jira Incoming sync rules
def statusMap = [ // "remote status name": "local status name" "New" : "To Do" , "In Progress" : "Working on it", "Done" : "Canceled" ] def remoteStatusName = replica.state issue.setStatus(statusMap[remoteStatusName] ?: remoteStatusName)
Alternatively, you can set the default local status using the getStatus node helper method.
issue.setStatus("status name")
Have more questions? Ask the community