Sub-Task Auto-Transition based on Parent state transition

Hi All,

We have a requirement like

When a User Story enters state 'X' , all sub-tasks (defect) associated with the User Story should be automatically moved to state 'x' if the conditions "Cause" = "Performance" or "PA value" > 0 are satisfied. Where 'Cause' and 'PA value' are custom fields associated to defect.

Kindly let us know how to achieve this. Hope to hear from you soon.

Thanks in Advance,


3 answers

1 accepted

1 vote

Or script runner... there is loads of sample code that does what you want.

yeah, plus look at the built-in scripts, plus lots of code here in AAC.

Thanks Florin and Jamie.


You mean to refer us to conditions and post function child pages on the link you provided. Right?

Thanks jamie, what do you mean by AAC .


You should check out JJupin for that. As a matter of fact, we have a tutorial that might be of interest to you here: . It explains how to automatically start progress on all subtasks when starting progress on the parent subtask.

In a similar faschin you can add a SIL Listener that will check your condition every time the issue is updated and autotransition the subtasks if necessary.


HI venkat,

you can also do it using Java Script.Here's the code,

jQuery(document).ready(function($) {

JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) {




function checkCondition(){

if($('#CauseId').val() == "performance" || $('#PAId').val()>0){

$.get("/rest/api/2/issue/{issueIdOrKey}", function(response) {
Read the response get all the subtask(defect) of the issue from the response,

read the issue's state from the response and put into a local variable.


for(loop for all subtask with defect){

$.post("/rest/api/2/issue/{subtaskissueIdOrKey}/transitions","fields required in json format", function(response) {});





Hope this helps.

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,305 views 14 20
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot