Note

We've packed up and moved from Confluence to Discourse to bring you a better, more interactive space. Out of courtesy we didn't migrate your user account so - you will have to signup again

The Exalate team will be on holiday for the coming days - returning Jan 4
Enjoy & stay safe

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Current »

Introduction


Since we can not use the 



Incoming Sync Jira On Prem
//imports

import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.link.IssueLinkManager


if(replica.relationid){

//getting Issue Manager component
def issueKeyFinder = ComponentAccessor.getComponent(IssueManager)

//sourceIssueId
def idThisIssue = issueKeyFinder.getIssueByCurrentKey(issue.key)

//destinationIssueId
def exalateId = nodeHelper.getLocalIssueFromRemoteUrn(replica?.relationid)?.key
def idIssueToBeLinked = issueKeyFinder.getIssueByCurrentKey(exalateId)


def sourceIssueId = idThisIssue.id 
def destinationIssueId = idIssueToBeLinked.id   
def linkTypeId = 10003
def sequence = 1L 
def remoteUser = ComponentAccessor.getJiraAuthenticationContext().getLoggedInUser()



def issueLinkManager = ComponentAccessor.getComponent(IssueLinkManager)
issueLinkManager.createIssueLink(sourceIssueId, destinationIssueId, linkTypeId, sequence, remoteUser)


}


Questions