Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • eMail items that are Done based on the status of the item and the status of a specific subtask

eMail items that are Done based on the status of the item and the status of a specific subtask

Maarten Verreck
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2025

I want to notify our release team that items are ready for them to process.
The criteria are:

  • The story or Bug must have the status Done.
  • One specific subtask that contains release info needs to have the status Done to.
    This subtask has the summary Gereed maken voor KIR-team.

The mail I send contains a table with the following info.

  • Issue Key, Issue Name
  • Release package number (customfield_10066)
  • The description field of the Gereed maken voor KIR-team subtask
  • The links to the attachements in the Gereed maken voor KIR-team subtask

I have got two variations working. One sends a mail when a story or bug is done. The other one runs a query once a week and sends a mail per story or bug that has transitioned to Done in the past 7 days.

Now my problem. I only want to trigger the mail when both criteria are correct. But my automation only looks at the criterium that the story is Done. 
When the Gereed maken voor KIR-team item is Canceled the mail is still send.

What am I doing wrong?

JQL search When Scheduled

project = FINM AND issuetype IN (story, bug) AND status = DONE AND resolved >= -7d

Query variable 2:
"{{issue.key}}", "{{issue.summary}}", "{{#issue.subtasks}}{{#if(equals(summary,\"Gereed maken voor KIR-team\"))}}{{customfield_10066}}{{/}}{{/issue.subtasks}}", "{{#issue.subtasks}}{{#if(equals(summary,\"Gereed maken voor KIR-team\"))}}{{#regexFindAll}}{{description}}(?m)^(\\|.*\\|)$ {{/regexFindAll}}{{/}}{{/issue.subtasks}}", "{{#issue.subtasks}}{{#if(equals(summary,\"Gereed maken voor KIR-team\"))}}{{#if(attachments.size)}}{{#attachments}}{{content}};{{/attachments}}{{else}}NVT{{/}}{{/}}{{/issue.subtasks}}", "{{#issue.subtasks}}{{#if(equals(summary,\"Gereed maken voor KIR-team\"))}}{{url}}{{/}}{{/issue.subtasks}}"

automation-1.pngautomation-2.pngcreate variable 1.pngcreate variable 2.png

1 answer

0 votes
Marc -Devoteam-
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.
November 5, 2025

Hi @Maarten Verreck 

I assume the JQL you provided is in the scheduled trigger then use a branch action for sub-task, then you can check sub-taks related to the trigger issues.

Also if you want to email based on the sub-taks, it needs to be in the branch.

An email action outside th branch is based on the main flow of the automation.

A note: a branch action runs parallel from the main flow of the automation, so what happens in a branch can only be used in the branch.

Maarten Verreck
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 5, 2025

Hi, 
That's correct. The JQL search is part of the trigger. 
But I also use it as the first step in the branch.

I'll try to put the e-mail part in the branch. When I did that earlier, The mail only had the info of the subtask and not the issue key and summary of the parrent.
So somewere in the branch I need to add that part.

Marc -Devoteam-
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.
November 6, 2025

Hi @Maarten Verreck 

You don't need it as first step of the branch as, it is in the trigger, the only items taken account of in the rule are based on that JQL.

What you could do is a lookup action to find all stories and bug and then branch on sub-task, send the mail in the branch and use the smart values lookupissues, to get the information from the found issues in the mail as well

Suggest an answer

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

Atlassian Community Events