Hello community,
About closing epics when child issues are closed, what branch rule can cover "both" Epic->story and also Epic->sub task?
This rule works if stories (or bugs) are 'completed':
And this works for closing an epic when the child issue is a sub task:
These are two different branch rules, 1) For Epic (parent) and 2) For Parent.
Though how can an Epic with, for example, 1 story child and 1 sub-task be closed? (where the sub task is directly of the epic, not of the story)
The desired result is epic is transitioned to complete, when either the story or the sub task is transitioned to complete.
Thank you,
Chris
Hi @Chris S_
For Jira Data Center, there is no branch that spans both types as there are different linkages for epic -> story and story -> sub-task.
You may address this using an if / else condition and branches inside. For example:
With Jira Cloud, a rule like this is simpler (in theory) as the parent field is used for the relationships of both.
Also...do you want this to be recursive, in that the completion of a sub-task could lead to completion of the grandparent epic?
Kind regards,
Bill
Hi @Bill Sheboy, Let's say an epic has 1 story and also 1 sub-task (direct child of the epic), if the story is marked complete first, then the epic should not transition, since the sub-task is still open. However, once the sub-task is also transitioned to complete, the epic should now automatically transition to complete. The challenge is how to validate both conditions before transitioning the epic.
thank you,
Chris
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Chris S_
Sorry for the delay in responding as I have been offline for a few weeks.
First, I believe sub-tasks are children of Story, Task, and Bug issue types, and not of Epic ones. Let's assume you meant the Epic has one or more Stories, each with zero-to-many Sub-tasks.
To validate all of them are completed before transitioning the epic, you would need to gather the keys of all of them first and test them. I believe that can be done using the Lookup Issues action and the Related Issues Condition. Please validate this with testing as I am using Jira Cloud, and not Server / Data Center version.
For example, let's assume the trigger issue is a Story:
"Epic Link" = {{triggerIssue.key}}
{{#lookupIssues}},{{key}}{{#subtasks}},{{key}}{{/}}{{/}}
key IN ( {{varKeyList.substringAfter(",")}} ) AND statusCategory != Done
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.