Send automated e-mail with all epics where child issues have been added or moved to "done"

Maurice Beuting February 4, 2025

Hey guys, 

I am currently struggling with an automated jira rule. 

I would like to have the following rule: 

  1. Every Thursday 
  2. lookup all Epics where child issues have been moved to status "done" or new tasks have been added during last 4 weeks
  3. and then Send ONE e-mail that contains all Epics that correspond to the query above. 


Please let me know if you need more details. 


Thank you in advance!

2 answers

0 votes
Laura Lopez February 4, 2025

What I'd do:

  1. Trigger : Scheduled on Tuesday
  2. Action: Lookup issues with JQL:
    issuetype=Task AND (created >= -4w OR status CHANGED TO Done AFTER -4w) AND parent IS NOT EMPTY ORDER BY parent
  3. Action: Send the email with the content
    {{#lookupIssues}}

    EPIC: <a href="{{parent.url}}">{{parent.summary}}</a>

    - <a href="{{url}}">{{key}}- {{summary}}</a>

    {{/lookupIssues}}


    You can customize your email message as you wish

    EDIT: I've added links to the message output :) 

 

0 votes
Layssa Souza
Contributor
February 4, 2025

Hi, @Maurice Beuting 

See if this helps you:

 

Step-by-Step Guide

  • Go to Jira Automation

    • Navigate to Jira Settings > Automation.
  • Create a New Rule

    • Click Create Rule.
  • Set the Trigger

    • Choose "Scheduled" trigger.

    • Set it to run every Thursday.

    • Select "Run JQL" and use the following query:

project = "YOUR_PROJECT" AND issuetype = Epic AND (
issueFunction in hasSubtasks() AND issueFunction in linkedIssuesOf("status = Done", "is parent of")
OR updated >= -4w
)

Explanation:

  • Finds Epics with completed child issues.
  • Includes Epics updated in the last 4 weeks.

Add Action: Send Email

  • Select "Send Email".

  • Configure the recipients (e.g., your team).

  • Use the following template for the email body:

Subject: Epic Updates - Week of {{now.format("MM/dd/yyyy")}}

Hello Team,

The following Epics have recent updates:

{{#lookupIssues}}
- **{{key}}**: {{summary}}
{{/lookupIssues}}

Best regards,
Team XXX

Save and Test

  • Save the rule and run a manual test to verify the results.

Best Regards. 

Maurice Beuting February 4, 2025

Hey @Layssa Souza , 

thank you for your support. Nice try, but I have already asked chatGPT as well and the proposed solution doesn't work. ;) 

Layssa Souza
Contributor
February 4, 2025

@Maurice Beuting , Do you have any plug-ins, such as script runner?

 

Layssa Souza
Contributor
February 4, 2025

I ask because I had carried out the test in my environment, despite it being a DataCenter environment, the behavior should be the same.

Evidência.png

Evidencia2.png

Unfortunately, the only thing that I cannot validate is the return of the email, due to a restriction on the hosted server.

If an error is being presented, you can share it for evaluation :)

Best regards.

Suggest an answer

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

Atlassian Community Events