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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

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?

Roy

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.

Regards,

Kristian

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. 

https://library.adaptavist.com/ 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
TAGS
Community showcase
Published in Jira

Building a powerful Kanban dashboard in Jira with Great Gadgets app

Kanban is a popular agile framework suitable for both operations and development teams. It does not matter if you are a support team handling issues reported by customers, an internal service desk te...

9 views 0 0
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