Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

How do you prevent an Epic from closing until all Stories are closed?

James Gray
Contributor
August 11, 2023

I'm trying to create an automation that prevents the closure of an Epic, if all of its Stories are not closed. I've been following this post Stop Epic from closing if unresolved stories/tasks but I am not sure how to go back and call the Epic ticket's custom field to update it, once all the stories are closed. 

I have it so that the automation checks to the epic to ensure it has a story, that has transitioned to done, where it then adds a value to the custom field. Now I need to set it so that, once all the fields have a value of 1 or once all the statuses are set to done, it then allows the Epic to close. 

 image.png

I'm not looking to add an app if at all possible.

 

Thanks! 

3 answers

1 accepted

2 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 11, 2023

Hello @James Gray 

It would've been helpful if there were images in the post you were referencing, as you have gotten a little off track.

In the step where they say " if: Stories match Status..." they are referring to using the If:Related Issues condition.

Screen Shot 2023-08-11 at 7.03.32 PM.png

That gives you the necessary fields to create the condition they described.

Screen Shot 2023-08-11 at 7.03.50 PM.png

 

Screen Shot 2023-08-11 at 7.06.49 PM.png

Stefan Salzl
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2023

Hi @James Gray 

I would suggest a combination of "setting a custom field" within your Epic (that was suggested in your link) and a workflow condition. 

The reason for this is that an automation rule cannot avoid a transition. The transition will be done and the automation rule could revert this afterwards. A workflow condition is the way to go if it comes to blocking transitions.

  1. regarding the automation rule:
    - whenever a story is closed/done and a parent (Epic) is linked
    - forEpic all stories are checken if done
    - if all done --> set field to 1
    - if not --> keep 0

  2. then add a condition to the workflow transition that checks against your custom field and only allow this transition to be done when the value equals 1.

Hope this was helpful. Please let us know if you have any further questions.

Best
Stefan

James Gray
Contributor
August 14, 2023

Thanks for the suggestions,

I followed your flow, and I had to change the original condition, it didn't seem to trigger when using "Is not one of", so I changed it to "Is one of", and seems to be performing correctly!

image.png

1 vote
Sanjog Sigdel
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 13, 2023

Hi @James Gray 

I've implemented the following condition:

My workflow for story transitions ticket from Approved-Ready for Prod -> Done. I have this condition:-

The ticket can only be marked as Done when it's subtasks are completed.

 

I did that using the Validation and Condition in workflow transition. It was handled without any automation.

Maybe this will help in case of EPIC without using Automation.

James Gray
Contributor
August 14, 2023

Hey @Sanjog Sigdel 

I have that same validation/condition set up for my subtasks, however, I'm trying to create one for Stories now, but that doesn't seem to be the default option under the same validation/condition settings. I think the workaround is going to be a customer value field.

Like Stefan Salzl likes this
0 votes
Maciej Dudziak _Forgappify_
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 6, 2024

Hi @James Gray 

I would propose an alternative solution using a validator. I am from Forgappify, and we developed the Linked Issues Validator, which can greatly simplify blocking parent-child relationships.

community_05.19_children.png

Choose the 'Children' or 'Stories' options and the status category in which child issues need to be in order to allow the transition.

I would appreciate it if you could give it a try.

Cheers

 

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events