Skip to main content
Example scripts
arrow icon
To homepage
Jira
Cloud icon
Cloud

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

Created 1 year ago, Updated 1 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
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