Confluence has been updated to version 6.15.9

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

Compare with Current View Page History

Version 1 Next »

 

Exalate does not provide a simplified scripting helper to do that  So at the moment you can send over the issue link details by exploiting the JIRA Issue Link API 

import com.atlassian.jira.component.ComponentAccessor
// ...
// other parts of the script are not shown for simplicity
def jIssue = ComponentAccessor
  .getIssueManager()
  .getIssueObject(issue.key)
def ilm = ComponentAccessor.getIssueLinkManager()
def linkToMapFn = { ldir -> 
  { l -> 
    [
      "from": [
        "id": l.sourceObject.id,
        "key": l.sourceObject.key
      ],
      "to": [
        "id": l.destinationObject.id,
        "key": l.destinationObject.key
      ],
      "direction": ldir,
      "linkType": (ldr == "outward")? l.issueLinkType.outward : l.issueLinkType.inward,
      "style": l.issueLinkType.style
    ] 
  } 
}
replica.customKeys.issueLinks = [
"out": ilm
  . getOutwardLinks(jIssue.id)
  .collect(linkToMapFn("outward"))
"in": ilm
  . getInwardLinks(jIssue.id)
  .collect(linkToMapFn("inward"))
]

Add the script below in the Create/Change processor of the Destination instance to receive Time tracking information from the Source Instance.

// add the links to description
issue.description = replica.customKeys.issueLinks.toString()