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

Script to tansition parent code status automatically based on child in JIRA Cloud using ScriptRunne

My requirement is to update the parent issue status to "In Progress" automatically from "To DO" when th sub-task status changes to "In - Progress".


I have different workflows for both issue types and got some code in google search and tried to copy paste the same code in post functions at the "In Progress" transition on my sub-task. But unfortunately it is throwing an error saying "Unable to resolve the classes" that I had imported in the code. Later I found out that the code I am using is for server version of JIRA and as I am using cloud it is not accepting.

As I am a non-technical person, not able to understand how to approach with this.

 

Could someone please help me with code and the steps to implement this

 

1 answer

1 accepted

1 vote
Answer accepted

Hi @Anna ,

You don't actually need to write any code if you're using Cloud. There is a pre-built ScriptRunner script called 'Transition parent issue' that is able to be selected when you add a ScriptRunner postfunction to your In Progress transition.

 

All you need to do is set the Transition ID to the ID of the transition that will take you to the In Progress status in your workflow, and set the Transition Name tied to that ID in the fields.

 

This should apply to all parent/child relationships, if you would like to restrict it to only sub-tasks you'll just need to add a simple scripted value.

Yes, Thank you so much Mike. Even I just realized now while looking at the post functions in workflow.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Jira

Demo Den Ep. 7: New Jira Cloud Reports

Learn how to use two new reports for next-gen projects in Jira Cloud:  Cumulative flow diagram and Sprint burndown chart. Ivan Teong, Product Manager, Jira Software, demos the Cumulative ...

275 views 1 2
Join discussion

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