You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to make use of a script from the scriptrunner documentation that creates a remotelink, however it doesn't seem to work. I am assuming the rest module used is not imported but I am unsure what module to import. The code is as followed:
// The url for the link def linkURL = '<LinkURLHere>' // the title for the link def linkTitle = '<LinkTitleHere>' // The issue key def issueKey = '<IssueKeyHere>' // Create the link on the specified issue def result = post("/rest/api/2/issue/${issueKey}/remotelink") .header('Content-Type', 'application/json') .body([ object: [ title:linkTitle, url:linkURL ] ]) .asObject(String) // Check if the link created succesfully if (result.status == 201) { return "Remote link with name of ${linkTitle} which links to ${linkURL} created successfully" } else { return "${result.status}: ${result.body}" }