Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to automate when multiple subtask are close, it will then close the story (Parent)

Charles Wayne May 23, 2025

Hey Hey, 

I might have missed this answer when searching, but I am looking to automate when closing multiple subtask, it will then trigger closing of the task/story. (Parent)  

Currently, the automation script that I have works like this:  I have 2 Task that are linked to the 1 Story.  When the one of Task moves from In progress to Complete, the the story transitions to Complete. The Second Task is still In-Progress.

 

Actual Results:  What I am getting is, when I close the first Task, it automatically close the Story and the 2nd Task is still In progress. 

Expected Results:  Both Task to be closed out, and then the story moves to Complete.  

***I am not able to use screenshots due to the type of project that I am working on.  

4 answers

1 vote
Marc - Devoteam
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.
May 23, 2025

Hi @Charles Wayne 

In the template section of automation there is even a rule for this, adjust it based on your requirements (status etc...)

The template rule is called: "When all sub-tasks are done → move parent to done"

0 votes
Charles Wayne June 2, 2025

Hey @Bill Sheboy and Everyone, 

So, the info that was provided from all worked for the subtask.  But.. I ran into another issue similar to the subtask triggering to close, and I can't find the right JQL script.  

I have multiple stories under one epic (1 to many).  I want the close the epic once all stories are closed/completed.  With the script I wrote for automation, which is similar to the ones above, the automation script is checking for all stories within the one project to be moved to done, before it triggers the epic to be closed.  I can't figure out the right change that needs to be made for the Parent to Child or Epic to Child relations.

Now, the twist is, the company I am with, created a Issue Type that sit on the Same level in the JIRA Hierarchy, which I think is the problem and why the other scripts that I wrote are not working.  Let me know what you think.   

Bill Sheboy
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.
June 2, 2025

Hi @Charles Wayne 

If you still cannot post the rule / audit logs, please try this approach:

First, check again with the built-in templates to learn if any of them will help.  If not...

  • Outside of the rule get your JQL working for your different scenarios using example issues
  • Create a test rule with a manual trigger and which does not update any issues: only write to the audit log.  Use this to test / confirm the correct issues are detected for the relationships.
  • Update your rule to change the trigger to Issue Transitioned, and test for you various cases

I also recommend meeting with your Jira Site Admin to explain the scenario and ask them to help.

Kind regards,
Bill

0 votes
Bill Sheboy
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.
May 23, 2025

Hi @Charles Wayne 

As you cannot post images of your rule or audit log, please compare your rule to the one in the built-in templates:

  • from the rule list
  • select templates
  • and then this rule: When all child issues are completed → then close parent

Based on what you describe, it is likely the rule is missing (or has an incorrect) condition within the branch to the parent work item.

 

Kind regards,
Bill

Bill Sheboy
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.
May 30, 2025

Hi @Charles Wayne 

Just following up to check if one of the responses answered your question.  If so, please consider marking it as "answered".  That will help others with a similar need find solutions faster.  If not, please let the community know what help you need with the rule changes.

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events