is there a way to close epic when all child items are closed?

Andres Velasco March 2, 2015

Hi, similar to sub-tasks / stories functionality, we would like to be able to have Epics closed when all items within it have been closed, is there a way to do that?

2 answers

0 votes
Bob Swift OSS (Bob Swift Atlassian Apps)
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.
March 3, 2015

You could use the Update issues post function on the Close issue transition to transition the related epic to closed based on the condition that the JQL that queries all non-closed subtasks of the epic returns 0. You will need to use Substitution variables to get the epic name and to condition on the JQL returning 0 issues.

Ben Richman May 9, 2016

We already use your add on here but i am struggling to get to grips with using Substitution variables to perform the question being asked in this thread. The documentation is quite difficult to follow as (for obvious reasons) it is not directly related to this request.

 

Could you please share some specifics on how one would accomplish this using the update issue post function?

Bob Swift OSS (Bob Swift Atlassian Apps)
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 9, 2016

I think you want original_Epic Link. It should be the issue key for the epic linked to the issue being created. So if that is not blank and the JQL query to find all issues associated with that epic.

0 votes
Jobin Kuruvilla [Adaptavist]
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.
March 2, 2015

Not using the Agile Board functionality. You will need to develop your own workflow post function that automatically closes the Epic when all the stories related to it are closed.

Andres Velasco March 2, 2015

Thanks for the response, is there any directions or documentation/samples you can facilitate so I can know how to perform this?

Jobin Kuruvilla [Adaptavist]
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.
March 2, 2015

You can see an example of writing a post function here: http://www.j-tricks.com/tutorials/workflow-post-function. You will need to use the above logic inside the post function.

Like Jeroen van der Veen likes this

Suggest an answer

Log in or Sign up to answer