How do I set the Epic as Done if all Stories are Done with Automation for JIRA?

andreas
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.
January 18, 2017

I'd like to automatically transition the parent Epic to 'Done' when all stories in that Epic have been finished.  Is this possible with Automation for JIRA?

4 answers

1 accepted

1 vote
Answer accepted
andreas
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.
January 18, 2017

Yes this is possible with the related issues action and condition! Here's an example rule:

Project automation - Code Barrel JIRA 2017-01-19 08-27-16.png

Here's what this does:

  • The rule is triggered when any issue is transitioned
  • Next we check with a JQL condition that the issue was a story and it's now set to 'Done'
  • Then we branch off using the related issues action for the Epic of this story
    • We then check if all stories in this Epic match status = Done
    • If that's true we transition the Epic to 'Done' as well

 

 

Dom Esposito August 30, 2017

Hi Andreas,

 

I've tried both your version and my modified version below and unfortuantley it's not working. What's weird is that I have 2 tasks linked to the Epic. When I transition both from To Do to Done, nothing happens. But then when I transition 1 (either) of the tasks back to "To Do" from "Done" it updates the status of the Epic from To Do to Done.

Of course, it should be updating the status when the both tasks linked to the epic transition to Done.

2017-08-30 at 6.57 PM.png

andreas
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 30, 2017

Hi Dom,

So that's strange - your rule looks correct to me.

Can you please raise a support request at https://codebarrel.io/support and include:

  • Screenshot of your rule's audit log
  • Screenshot of the issue history tab showing the transition

Cheers,

  Andreas

Dom Esposito August 31, 2017

Andreas thanks for the speedy reply CBS-3090

Like Karl FURGEROT likes this
Gianni Pucciani September 8, 2020

@andreas The branch is possible only with the PRO version, any workaround for the free version of automation?

0 votes
Trent McClure October 21, 2022

epic_done_when_stories_done.jpgMake sure you are using "Done" in your JQL not just typing Done. I would also validate the JQL and make sure it's returning stories. 

 

This youtube link also helps

https://www.youtube.com/watch?v=IgUDuvJS6AM

0 votes
Rajesh Ramankutty February 6, 2022

@andreas @Jenny Severin @Gianni Pucciani @Dom Esposito 

How to do this with out using Automation for JIRA plugin 

we have only script runner can anyone suggest me how to achive this.

Jenny Severin February 7, 2022

@Rajesh Ramankutty Sorry, I do not have any experience with script runner

Gianni Pucciani April 26, 2022

Hi @Rajesh Ramankutty not sure if with ScriptRunner you can do the same, but with JMWE I do a similar operation with Stories and Subtasks. 

Update parameters of the Transition parent issue (JMWE add-on) Function for this transition.

Then in the parent you need to have a condition like this:

All sub-tasks must have one of the following statuses to allow parent issue transitions: DONE CLOSED or CANCELED 

Rajesh Ramankutty April 26, 2022

Thank you @Gianni Pucciani 

0 votes
Jenny Severin April 8, 2021

Question: We are using Sub-Tasks and Tasks in an Epic to manage onboarding.  I am able to get the Epic to close when all Tasks are completed, but it does not close when a sub-task of the Epic is closed. 

In the audit log when the final sub-task was closed, the action details stated:

"This rule was configured with a project restriction. You can change this restriction in the 'Rule details' section. Only issues from the following projects or project types will be considered:HR"

Is there something wrong in my Automation rule?

Jenny Severin April 8, 2021

Auto Close Onboarding.jpgRule onboard.jpg

supriya deshmukh May 30, 2022

@Jenny Severin did you get resolution for the above issue?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events