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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,556,612
Community Members
 
Community Events
184
Community Groups

Jira Automation: How to start and close Epic automatically depending on contained issue transitions?

Hi all,

I would like to start and close my Epics automatically by working on the epics's issues alone.

i.e.

* when I start the first of its issues, the Epic should be transitioned to a certain status in its workflow

* when I close the last of its issues, the Epic should be closed, too.

 

How can I do this w/ Jira automation?

 

3 answers

2 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.
Nov 05, 2021

Hi @Ingo Mohr 

Yes, you could do this for specific status values or generically (with statusCategory). I encourage you to experiment and try both ways to learn about automation rules.

For example as generically, ignoring issue status:

  • trigger: issue transitioned (status values do not matter)
  • condition: issue type is Story, Task, or Bug
  • related issues condition: epic exists
  • if/else...
    • advanced compare condition: statusCategory is "in progress"
    • branch: on epic parent
      • condition: epic is not in progress
      • action: transition it to your in progress status
  • else
    • advanced compare condition: statusCategory is "done"
    • action: lookup issues with JQL with the same parent that are not done
    • advanced compare condition: {{lookupIssues.size|0}} equals 0  (so, everything is done)
    • branch: on epic parent
      • condition: epic is not already done
      • action: transition it to your done status

 

Kind regards,
Bill

Thanks @Bill Sheboy

I had to fiddle around a little bit - but I could get the rule up and running. :)

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.
Mar 30, 2023

Hi @Adam Ziecik 

I do not believe so, as this approach uses the Lookup Issues action, which is not supported by the Server/Data Center version you are using.

Please see the other thread for my additional suggestion.

Kind regards,
Bill

1 vote
Daniel Turczanski - JQL Search Extensions
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
Nov 10, 2021

Hi @Ingo Mohr ,

If you have our JQL Search Extensions, you can create a scheduled daily or hourly rule to find the epics that need to be transitioned:

type=Epic AND statusCategory="To Do" AND (issuesInEpicToDoCount>0 OR issuesInEpicInProgressCount>0) 

You can find more examples in the documentation.

Thanks!

Thank you @Daniel Turczanski for suggesting your plug-in. It's not my Jira instance, however. But still: good to know :)

1 vote
Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 05, 2021

Your automation should look something like this:

Screen Shot 2021-11-05 at 4.01.16 PM.png

Mikael Sandberg
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 05, 2021

And if you look in the library you will find an automation that will close the epic once all stories are done.

Thanks @Mikael Sandberg !

This worked - and I think this helps me get going too for other rules.

 

### Suggestion

However, while I was editing the rule, I asked myself why there isn't a feature to specify rules as a script - maybe directly with a Bitbucket Repo link - so that I can maintain rules in Bitbucket (with tags) and then refer to the tag of a rule script in Bitbucket...

Is this something you can take back to the team - as a community leader?

 

Thanks

Ingo

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events