Skip to main content
Home page
Example scripts
To homepage
Jira
Cloud icon
Cloud

Create remote link

Created 2 year(s) ago, Updated 19 day(s) ago
App in script
ScriptRunner For Jira
ScriptRunner For Jira
by Adaptavist
Compatibility
compatibility bullet
Jira
Language |
groovy
// The url for the link
def linkURL = "<LinkURLHere>"

// the title for the link
def linkTitle = "<LinkTitleHere>"

// The work item key
def workItemKey = "<WorkItemKeyHere>"

// Create the link on the specified work item
post("/rest/api/2/issue/${workItemKey}/remotelink")
        .header("Content-Type", "application/json")
        .body([
        object: [
                title:linkTitle,
                url:linkURL
        ]

])
        .asObject(String)
Having an issue with this script?
Report it here