Forums

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

Automation to complete epics when all linked tickets are complete

Colum McAndrew
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.
October 8, 2021

I'm trying to see if there is a way to mark epics as complete once all issues that form part of it are complete. We find that folk focus on the epic's tasks, and forget to return to the epic to mark it as complete. This is a real problem if the tasks are assigned to multiple individuals or teams.

I've looked at automation, but I couldn't see anything there that would do it. Having said that, I'm not an automation expert.

It would help save us time if we could come up with a solution, as I'm sure we're not the only people to come up against this. Many thanks.

1 answer

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.
October 8, 2021

Hi @Colum McAndrew 

There are two steps to do this (other than confirming the child issues are "done") in one rule:

  1. Transition the epic to your "done" status, whatever that is called
  2. Mark the epic as done so it drops from drop-down lists.  You may do this step with an advanced edit:
{
"fields": { "customfield_10010": { "value": "Done" } }
}

We set up a rule, trigged on epic transition to our "done", to automate that second step.

If this does not work, please identify your custom field ID for "epic status".

Kind regards,
Bill

Colum McAndrew
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.
October 10, 2021

Many thanks for the response @Bill Sheboy but maybe I'm missing something. We don't want to have to change the status of the epic manually at all. What I'm after is that the epic is automatically set to our done status when all the tickets linked to it are marked as done. Correct me if I'm wrong, but your automation seems to suggest something different.

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.
October 11, 2021

Hi @Colum McAndrew 

Sorry, I was confusing your post with a similar one.  I thought you had already figured out the child-triggered part...and so I was noting the last part about updating the epic itself.

For your whole solution, could use a couple of approaches:

  • When ever an issue transitions to "done", find out if it has a epic parent (or grand-parent), then work forwards to scan all children/grandchildren.  This can be done using the related issues conditions and branching structures.
  • Use a scheduled rule which checks the epics periodically, walking their entire "tree" for the check

The first technique would move the epic to done as soon as possible, but is susceptible to closing too early if an child was moved in error.

Either approach can be done using one rule, or two rules to reduce the complexity.  From the template library, here is an example rule for the story/task --> sub-task layer:

https://www.atlassian.com/software/jira/automation-template-library/rules#/rule/140671

Here is the blog post originally written to explain that rule: https://blog.codebarrel.io/synchronize-parent-and-sub-task-issues-with-automation-for-jira-bdcca6c9d453

The same idea can be used as a starting point to work from story/task to their "siblings", and then update the epic.

Here is another post from one of the automation engine developers, explaining variations closer to what you asked:

https://community.atlassian.com/t5/Automation-questions/How-do-I-automatically-trigger-a-status-change-on-a-parent-issue/qaq-p/273658

Like Colum McAndrew likes this
Colum McAndrew
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.
October 12, 2021

Excellent. Thank you so much @Bill Sheboy 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer