Confluence has been updated to version 6.15.9

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Snippet
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": (ldrldir == "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"))
]

...