How to Create a Jira Link between Issues in Local Sync

    This article shows you how to create a real JIRA link between the source and destination issues in local connection.

    The link remains even if the issue has been Unexalated. By default, the Exalate app displays a remote issue link on the Sync panel, but once you Unexalate an issue, the sync panel is removed from the issue view. In some cases, it would be handy to keep the remote issue link on the source issue, even if the synchronization is finished. It could be achieved with the help of Jira Server API and Exalate external scripts library.

    Note: In a local connection, you have only one set of the Sync Rules for both sides.

    Importatnt: We provide these scripts as an example. There is no guarantee of script stability, as they didn't run through a complete validation cycle. We love to get feedback on experimental features. Join the Exalate community to share your feedback and ask any questions you have.

    Upload the File

    Upload the files into the $JIRA_HOME/scripts directory.

    Add Scripts to the Sync Rules

    Outgoing sync

    replica.key           = issue.key

    Incoming sync

    return CreateIssue.create(
      replica,
      issue,
      relation,
      nodeHelper,
      issueBeforeScript,
      remoteReplica,
      traces,
      blobMetadataList){
       LinkIssuesLocalSync.addLink(
            "Escalated from", // Replace the value with the relevant link type name: you can find it in your Jira issue linking settings
            replica,
            issue,
            connection
       )
       return null
    }

    Example

    The remote issue link displays on the Sync panel and in the Issue Links section.

    The remote issue link remains in the Issue Links section (the issue is not under sync anymore).