How to Sync Epics in Jira On-premise

    In this article, we describe how to synchronize Epics, including the Epic link.

    Note: Requires Exalate for Jira Server/DataCenter version 4.5.1 or higher

    With Exalate, you can sync epics and stories, while keeping the parent-child relationship on the remote side.

    Note: To keep parent-child relations between issues, you need to synchronize Epics first, then synchronize stories.

    Configuration

    After you establish a connection between two Jira instances, you need to configure the Sync Rules.

    Note: The script works only when using scripting rules on Jira On-premise. It's not compatible with Exalate Visual mode. You can only map the Epic name custom field in Visual mode.

    To sync epics in Jira on-premise:

    1. Create files from the Exalate public repository.
      Note: We store external scripts for Jira on-premise in a public repository. Copy the code from the repositories below and create .groovy files. You must keep the filenames as below. Note that you need to disable/enable the Exalate add-on such that the new file is added to the classpath.
    2. Upload the files to $JIRA_HOME/scripts directory.

      Note: $JIRA_HOME/scripts directory is located on the server, where you have your Jira instance installed. If you don't have a script directory you should create one. For more information, please read How to add an external script in Jira on-premise.

    3. Configure Sync Rules with the scripts provided below:

      Add the code from the repository accordingly to the bottom of the Sync Rules.

    Outgoing Sync

    Add the following code to send the Epic information together with the Epic Link.

    Note: You need to synchronize Epic first, then synchronize stories to keep the parent-child relation between issues.

    // Ensure that the Epic is synced first, such that stories sent later can be associated to the right epic
    Epic.sendEpicFirst()
    (warning) This example shows the case where the order does not matter, still keeping the parent-child relation between Epic and Stories. The Epic Link is also synchronized.
    Epic.sendInAnyOrder()

    Incoming sync 

    Add the following code to apply received Epic information, including the Epic Link:

    // Move this to the end of the incoming sync script
    Epic.receive()

    Have more questions? Ask the community