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,298,803
Community Members
 
Community Events
165
Community Groups

Automation: email when all tasks in Epic are done

Dear all, 

I have a simple automation to set, but can not get it to work. 

We use Epics with Stories, Documents, Leads and Tasks. I would like to set an automation, that would send an email, when all the Tasks within Epics are finished (regardless of the Status of other Issue within Epic: Stories, Leads, Documents, etc. )
Is it possible? I tried to set JQL but failed several times. Any help would be appreciated :) 

image.png

2 answers

1 accepted

2 votes
Answer accepted
Alex Koxaras Community Leader Jun 09, 2022

Hi @Staša Frank 

I would do something like this:

  • First you check that the issue transitioned to Done is a Task
  • If it's a task then you search the parent
  • For "stories" that are of issue type Task and they have a resolution
  • Then you send the email

myRule0001.png

Hope that helps!

Alex

Hi Alex and thank you for your help. 
Unfortunately it does not work. :/  It fails at branch condition. 
I guess Jira understands this rule as ''ok, look for issues in epic, and if all of them are tasks and done, then send email'' Since I have issues in Epic that are not all tasks, but also stories etc... it fails. :/ 

Any other ideas? 
image.png

Alex Koxaras Community Leader Jun 10, 2022

Hi @Staša Frank 

By saying "it fails", you don't give me a lot to help you :/

I need to see the audit log and identify the reason your rule fails. Mine worked like a charm. Can you also please share a screenshot of your rule?

Thanx!

Sure: PP-122 is my task and PP-119 is Epic (contains two Tasks and one Story)
I even tried to set all the issues on Done and it still does not work. 

image.pngimage.png

Alex Koxaras Community Leader Jun 10, 2022

@Staša Frank many many thanks for this request you had! I've got this after a bit of trial and error:

screencapture-koxaras-atlassian-net-jira-software-c-projects-DSP-settings-automate-2022-06-10-13_34_51.png

  • Trigger is the same as before
  • Add a check that the issue type is a task
  • Lookupissues all tasks within the epic
"epic link" = {{issue.epic.key}} and issuetype = task
  • Save the above size as a variable allTasks
{{lookupIssues.size}}
  • Lookupissues all done tasks within the epic
"epic link" = {{issue.epic.key}} and issuetype = task and status = done 
  • Save the above size as a variable doneTasks
{{lookupIssues.size}}
  • Compare these two variables
  • If they are equal, then send email

Try it and let me know!

Alex

P.S. Great, great, great exercise!!

You are amazing. I had some problems, but it WORKS!!! 

Have a wonderful day! 

P.S. Glad I could help with exercise :D 

Like Alex Koxaras likes this
Alex Koxaras Community Leader Jun 10, 2022

Glad to know that it worked!

Hey Frank,

u can the "Related issues condition" conditon:

Screenshot 2022-06-09 155739.jpg

Hi and thank you for your help. But unfortunately this rule does not exclude other types of issues in Epic .:/ 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,900 views 37 49
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you