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 to set automation to close EPIC when a set number of tasks are completed?

Cindy Chan
Contributor
October 27, 2021

Hi all,

I could close an EPIC when all tasks under that EPIC are completed.

Today, I received a query from my team to close an epic when half of the tasks under the epic are done while the rest (which would be negligible if half of them are completed) are not.

Is there any way I could set Automation for Jira to do that?

Thanks!

1 answer

1 vote
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.
October 27, 2021 edited

In my opinion...

It is counter-intuitive and contrary to best practices to close an Epic that has not-closed child issues. I think you should push back on that request. If the child issues don't need to be completed for the Epic to be considered complete, then why are they in the Epic? If the Epic can be considered complete without that work being completed, then those incomplete items should be moved out of the Epic.

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 27, 2021

Hi @Cindy Chan 

Yes, and...to Trudy's thoughts:

This could be automated, however the only time I have seen a use case like this was when the business problem/need for the Epic was considered "solved" when part of the work was completed.  (i.e. 80/20 rule, or Pareto Principle)  For such a scenario I would expect the requestor of the Epic to make that call, and not based upon a number of completed issues.

Would you please clarify how you are using Epics (and their child issues), as that may help the community to offer ideas?  Thanks!

Kind regards,
Bill

Cindy Chan
Contributor
October 27, 2021 edited

Hi Trudy and Bill,

Thanks for your opinion. I get you that they are pretty counter-intuitive if it were to be software tracking process.

At the moment, we're using Jira to track biological experiments - certain plant traits after tissue culture.

In each group of plants, some would be positive for the trait we're looking for while some don't. And so, as long as we reach the target number of independent plants with the traits we're looking for, e.g. at least 20 plants, then we could move forward to phenotype them - thus considered the EPIC closed. We have various projects going on at the same time in the facility, each for a different set of traits. We need to track each plant since they are considered independent line and we have to do genotyping of each plant so each plant is an issue under the epic.

Best wishes, Cindy

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 27, 2021

Thanks, Cindy!  I had not thought of such a use case before: the number of child issues in a particular status correlates to the progress of the parent epic.

You can probably modify/copy your existing rule to do what you ask:

  • action: Lookup Issues action with JQL to find the siblings of a trigger issue (with the same epic parent)
  • action create variable to save the total sibling count: {{lookupIssues.size|0}}
  • action: use Lookup Issues action again, except this JQL only finds completed issues for the epic
  • action create variable to save completed count
  • advanced compare condition: test your threshold by doing math on the values
  • now that you have decided to close the epic...
  • branch: on any open child issues of the epic
    • action: add comment why the issue is moving to done
    • action: transition to done
  • branch: on the epic parent
    • action: add comment why the issue is moving to done
    • action: transition to done

Suggest an answer

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

Upcoming Jira Events