2
1
0

I would like to know if it is possible to automatically exalate linked issues when an issue is exalate. we have a use case where we would like to exalate "Milestone" Issuetype linked to an "Epic" when Epics on different instances are exlated.

    CommentAdd your comment...

    1 answer

    1.  
      2
      1
      0

      Hi Sai,


      I built this little snippet for you, you can add this to the end of your Outgoing script on the side that is creating the Epics with the issue links, can you try this out and let me know:


      if (issue.typeName == "Epic") {
          def exaCl = com.atlassian.jira.component.ComponentAccessor
              .pluginAccessor
              .getEnabledPlugin("com.exalate.jiranode")
              .getClassLoader()
          def exaSyncServiceClass = exaCl.loadClass(
          "com.exalate.api.trigger.ISyncInitiationService"
          ) 
          def syncService = com.atlassian.jira.component.ComponentAccessor.getOSGiComponentInstanceOfType(
              exaSyncServiceClass
          )
           def im = com.atlassian.jira.component.getIssueManager()
          replica.issueLinks.collect{ link ->
           def linkedIssue = im.getIssueObject(link.otherIssueId)
           if (linkedIssue.issueType.name == "Milestone") {
              syncService.pair(
                linkedIssue.key, // specify the issue key you want
                connection.name // set the relevant connection name
              )
           }
        }
      }


      Thanks,


      André

        CommentAdd your comment...