Automation rule to send single email for all issues per assignee due next week

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

This article covers the steps to create an automation rule to send an email with a list of open issues due next week to individual assignees. The automation rule will first find the list of issues due next week, and then it will do another lookup for each assignee and send them the list of their due issues.

Solution

Please create an automaton rule with the below configuration:

  1. Add a scheduled trigger if you need this information to be sent based on a specific schedule and a specific time of the day Or based on a cron expression. (Note: The scheduled trigger should not contain a JQL query for this automation rule. Follow step 2 to add a Lookup action that will perform the JQL query).

  2. Add a Lookup Issue action to find all the issues due next week:

    1 project = "AP" AND due<=1w AND due>= now() and resolution = "Unresolved"

    Please note that lookupissues can only return 100 issues at a time. If you think you have more issue, in that case further modify the scope of the JQL to return issues under 100, and have a separated rules to cover rest of the issues.

  3. Add a Branch → Advanced branching with the below smart value. Distinct function returns all items in a given list, without duplicate items.

    Advanced branching
  4. Within the Advanced branch that will run for distinct list of assignees, add another lookupIssues action to find a list of due issues for each distinct assignee iteration. Here is the JQL that you can use:

    1 project = "AP" AND due<=1w AND due>= now() and resolution = "Unresolved" and assignee= {{distinctAssignee}}
  5. Within the branch, add a Send email action after the lookup action. In the recipient field TO, add the following smart value:{{distinctAssignee.emailAddress}} Add the below information in the email content:

    1 2 3 4 5 6 7 Hey {{lookupIssues.assignee.displayName.distinct}}, Here are the list of issues assigned to you that are due next week: {{#lookupIssues}} * {{key}} | {{summary}} | {{assignee.displayName}} | {{url}} {{/}}
    Send email

    Here is what the complete rule will look like

    Complete rule screenshot

    Here is what the email will look like

    Email received from automation rule

    Here is what the audit logs will look like, an email sent for each distinct assignee

    Audit log

Updated on June 13, 2024

Still need help?

The Atlassian Community is here for you.