JIRA SERVER STARTING FROM 4.5.1
This page shows how to synchronize issue statuses in Jira Server bi-directionally. You can map workflows between two JIRA Instances or set the transition manually.
JIRA requires that status is updated by progressing an issue through the different workflow steps. This ca be achieved in different ways:
- Manual modeling every step
- Using any to one type of transitions
- Automatic progressing to the right status using advanced groovy scripting
Exalate provides different approaches to configure status synchronization when workflow transitions are global or there's only one transition to get to the right status:
Let's consider you already have the Connection configured between two JIRA Instances.
Now you need to configure status synchronization
Control the transition applied on your local issue
To send the status use the code belowDestination side
workflowHelper.transition method allows you to set a local transition based on the remote issue status.
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:
1. Create files from the Exalate public repository
We store external scripts for Jira Server in a public repository. Copy the code from the repositories below and create .groovy files. You must keep the file name as below.
2. Upload the files to the $JIRA_HOME/scripts directory
3. Configure Sync Rules with the scripts provided below:
Add the code to a new line in the bottom of the incoming sync rules block.
If statuses are the same on both sides, use this code:
If the statuses are different, use this code with your status mapping
Include Status.receive(..) at the end on the incoming processor. Any other changes coded after it will be ignored.
Status.receive has the following parameters:
useRemoteStatusByDefault = true
Use the remote status by default.
workflowMapping = [:]
Defines the status mapping as on the example below
resolutionMapping = [:]
Defines resolution mapping as on the example below