Confluence has been updated to version 6.15.9

JIRA CLOUD


This page shows how to synchronize issue statuses with global transitions in Jira Cloud. You can map workflows between two JIRA Instances or set the transition manually.Exalate provides different ways to configure status synchronization when workflow transitions are global or there's only one transition to get to the right status:

Configuration

Let's consider you already have the Connection configured between the Instances.

Now you need to configure Sync Rules with the scripts provided below:

Add the snippets below to the new line in the end of the existing scripts.



Source side

Outgoing sync

replica.status = issue.status

Destination side

Control the transition applied on your local issue 

Use this approach if want to control the transition applied on your local issue.

You can apply only one transition per synchronization using this approach. That means that the code below wouldn't work: 

//if the local issue status is 'In Progeress' and the remote issue status is 'Resolved' use 'Resolve' transition

if (issue.status.name == "Open" && replica.status.name == "Resolved") {
   workflowHelper.transition(issue, "In Progress")
   workflowHelper.transition(issue, "Resolve")
} 

If you need to perform more than one transition in a single sync, please refer to Status synchronization on Jira Cloud with multiple transitions in a single sync


 workflowHelper.transition method allows you to set a local transition based on the remote issue status. 

Incoming sync

//if the local issue status is 'In Progeress' and the remote issue status is 'Resolved' use 'Resolve' transition

if (issue.status.name == "In Progress" && replica.status.name == "Resolved") {
   workflowHelper.transition(issue, "Resolve")
} 

In case you need to set different transitions depending on the remote status you need to add the script for each transition separately. Check the example below:

//if the local issue status is 'In Progeress' and the remote issue status is 'Resolved' use 'Resolve' transition

if (issue.status.name == "In Progress" && replica.status.name == "Resolved") {
   workflowHelper.transition(issue, "Resolve")
} 

//if the local issue status is 'Done' and the remote issue status is 'Resolved' use 'Close' transition

if (issue.status.name == "Done" && replica.status.name == "Resolved") {
   workflowHelper.transition(issue, "Close")
} 



Map statuses

Use this approach when you want to have statuses synced automatically based on the configured status mapping

Source side

Outgoing sync

Status.send()

Destination side

Incoming sync

  • If statuses are the same on both sides, use this code:

Status.receive()

  • If the statuses are different, use this code with your status mapping

Status.receive(["Done": "Resolved", "In Progress": "In Action"])

  • If you want to set a default status directly in the rules use this code

 Status.transitionTo("Done")

  • If the remote side has not set the resolution, change the local issue status to Done

if(replica.resolution != null){
   Status.transitionTo("Done")
}

See also