Automation: email when all tasks in Epic are done

Staša Frank June 9, 2022

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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 9, 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

Staša Frank June 10, 2022

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

Like Andre Schmidt likes this
Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 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!

Staša Frank June 10, 2022

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 _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 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!!

Like Andre Schmidt likes this
Staša Frank June 10, 2022

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

Have a wonderful day! 

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

Alex Koxaras _Relational_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 10, 2022

Glad to know that it worked!

0 votes
DasJo June 9, 2022

Hey Frank,

u can the "Related issues condition" conditon:

Screenshot 2022-06-09 155739.jpg

Staša Frank June 10, 2022

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
AUG Leaders

Atlassian Community Events