Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner add remotelink


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}" }


0 answers

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence Cloud

🎨 Add some visual life to your templates

Hi Atlassian Community, My name is Avni Barman, and I am a Product Manager on the Confluence Cloud team. Based on feedback from you, we are giving admins more power to create templates that a...

130 views 1 4
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you