How to trigger status change automatically for parent based on its children's statuses?

Saurabh Zunke August 6, 2018

We have a two level Issue Type hierarchy for our use case.

Parent --> Child --> Grandchild 
(these are set up using Portfolio for JIRA so are separate Issue Types and not Sub-Tasks)

e.g.

A (Parent) --> B, C (Child)

B (Child) --> D, E (Grandchild)

C (Child) --> F, G (Grandchild)

We want to cascade status updates from the Grandchild level all the way up to Parent level. i.e. If one or more grandchild moves from NEW to IN-PROGRESS, the parent automatically moves from NEW to IN-PROGRESS - applicable across all hierarchies

Considering this example, details are as follows:

a) When D or E moves from NEW to IN-PROGRESS, its Parent B will move from NEW to IN-PROGRESS and furthermore its own parent A will move from NEW to IN-PROGRESS

b) When D & E both move from IN-PROGRESS to COMPLETE, its Parent B will move from IN-PROGRESS to COMPLETE

c) When all D, E, F & G are COMPLETE, and their Parents B & C will be COMPLETE and furthermore, the Grandparent A will move from IN-PROGRESS to COMPLETE

What is the best way of implementing this functionality?

We are considering Automation for JIRA plugin and also running a custom script using Scriptrunner

Thanks in advance for all your responses! :) 

1 answer

1 accepted

1 vote
Answer accepted
Scott Harwood
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 6, 2018

Hi Saurabh,

The answer is it depends on what issue types your using. If your using standard issue types than you can sync the parent by using a related issues branch with the JQL:

"Parent Link" = {{issue.key}}

For example:

Screen Shot 2018-08-07 at 2.32.44 pm.pngThen to ensure the transition continues to bubble all the way up the hierarchy you will also need to ensure this checkbox is checked on the rule details:

allow-trigger.pngIf your hierarchy contains the "epic" issue type,  the parent link is maintained via the "epic link" field instead of Parent link. So, in that case, you need to alter the rule to use an if/else block that checks the issue type and if it matches epic than do the branching on "epic" rather than JQL. Let me know if this is the case an I can go into more detail, I don't want to over complicate this solution. 

Let me know if that works for you.

Cheers,

Scott

Saurabh Zunke August 8, 2018

Thanks for the reply Scott.
We were able to use the plugin to implement our requirements.

Rasmus Vedel September 6, 2019

Do you know any way I can do "the opposite": 

I want to have all the children have their individual status UNTIL I click done to the parent-issue, then I want all children to be done as well. 

Do you know how to do that? 

 

Rasmus

Nachiket Bal February 25, 2020

@Scott Harwood 

I tried using the solution you mentioned in the above thread, the behaviour i am seeing is exactly opposite.

When the Children change status for Eg: All go to complete the Parent does not move from In-Progress to Complete, but when the Parent status is changed from in-progress to complete all the children move to complete. What am i doing wrong?

 

Thanks

Devi karthikeyan August 20, 2020

@Saurabh Zunke May i know what is the Plugin that you were using to implement your requirement.

Like errol.kwan likes this
Devi karthikeyan August 20, 2020

@Scott Harwood I could not find the Screen that you have shared in your reply in my JIRA Server. but i could see the below image and also when i clicked on triggers i could see only those related to Bitbucket.

triggers.JPG

Suggest an answer

Log in or Sign up to answer