Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Adaptavist Script Runner for Jira CLOUD examples

Adaptavist Script Runner for Jira Cloud is a different beast to its server/DC cousin.

Can anyone direct me to some example scripts?  For example, I am trying to create a sub-task and populate the summary of the sub-task based on a prefix and the parent summary.  Relatively straightforward on Server, but "different" on Cloud.  I would also like to populate other custom fields in the subtask (in most cases just a copy from the parent).

Any examples I can use?


1 answer

1 accepted

2 votes
Answer accepted

Hi Roy,

Thank you for your question.

I can confirm that you cannot use the same code that you would use in ScriptRunner for Jira Server inside of ScriptRunner for Jira Cloud because Atlassian only provides a rest API in Jira Cloud and does not provide a Java API in the cloud like they do in Jira Server.

You can see more detailed information on the differences between the cloud and server versions inside of our documentation page located here.

We would recommend reviewing the documentation for ScriptRunner for Jira Cloud which is located here along with the Jira Cloud Rest API Documentation in order to see how the REST API's work in Jira cloud.

As for examples, I would advise reading the knowledge base article which we have created located here which explains how to start learning the ScriptRunner for Jira Cloud plugin.

I would also advise reading through the documentation site located here which contains examples of how to common actions on the Script Console and Script Listeners page.

Finally, I would advise looking at the Create Subtask built-in post-function script which the script provides located here. I can also confirm that the example located here shows how to copy the assignee from the parent issue and may be a useful reference to show how you can create additional code to copy values from the parent issue.

If this response has answered your question can you please mark it as accepted so that other users can see it is correct when searching for similar answers.



Kristian, as always, has given you a much better answer than I usually would (I'm blunt, minimal and tend to focus on one single thing.  Whereas Kristian will give you a lot of information and options), but he did miss one resource I would want to mention as well. is also worth a look when you're writing scripts.  I'm pretty sure Kristian has written a good amount of the content in it too!

Like # people like this

Suggest an answer

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

An update on Confluence Cloud customer feedback – June 2022

Hi everyone, We’re always looking at how to improve Confluence and customer feedback plays an important role in making sure we're investing in the areas that will bring the most value to the most c...

260 views 2 5
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