Example scripts
To homepage
Jira

Add or Update the Issue Link for an Issue in Jira Cloud
App in script

ScriptRunner For Jira
by Adaptavist
Compatibility

Jira
Language |
groovy
// Specify the source issue
final sourceIssueKey = "TEST-1"
// Specify the target issue
final targetIssueKey = "TEST-2"
// Specify the link direction name to use
final linkType = "blocks"
// Create the issue link between both issues
Issues.getByKey(sourceIssueKey).link(linkType, targetIssueKey)
Having an issue with this script?
Report it here