JIRA SERVER

This article shows how to sync sprints using external scripts library.

Introduction

This article includes groovy scripts that help to synchronize sprints between Jira Server instances. Synchronizing sprints means all sprint information will be exchanged between two instances. 

We have two Jira Server Instances. The source Jira Server has the project that needs to be synchronized with the destination Jira Server.

JIRA agile board operations that trigger sync (change the custom field values):

  • adding an issue to a sprint 
  • removing an issue from an active or future sprint

JIRA agile board operations that don't trigger sync:

  • starting a sprint 
  • completing a sprint


The sprint start works if you start a sprint and then change the issue in that sprint on the source side.

The sprint stop works only if all the issues in the sprint are synced and if you make a change in any of the issues in that sprint after stopping it.


Configuration

Let's consider you already have the connection configured between JIRA Server instances.

Now you need to configure Sync Rules to sync sprints.

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 names as below.

2. Upload the files to the $JIRA_HOME/scripts directory

3. Configure Sync Rules with the script provided below:

Add the snippets below to the end  of the Sync Rules.



Source side

Outgoing sync(data filter)

AgileSync.sendSprints(true, replica, issue, connection)

Destination side

Incoming sync for new issues(create processor)

AgileSync.receiveSprints(replica, issue, nodeHelper)

Incoming sync for existing issues(change processor)

AgileSync.receiveSprints(replica, issue, nodeHelper)

4. Bulk Exalate issues 

To synchronize multiple issues at a time you need to create a trigger and perform Bulk Exalate

Exalate is running through all the issues and sending out all the information from the source instance to the destination instance. After a while, all issues will be showing up in the same configuration as on the source Jira Server.

Congratulations! Now you know how to sync sprints on Jira Server using Exalate. 

Note

 If you want to use this script, but you are missing a functionality or would like to get it adapted to your use case, contact us at https://support.idalko.com.