How to set up JIRA Automation to send 1 email of list of overdue items to PMs and PMMs?
Asked by JD:

Hi,

I want to set up automation to send 1 email with a list of overdue items to both the PM and the PMM listed in the initiative. Is something like this possible?

For example, let's say the project is called 'CORE' and the following keys/items are overdue:

* CORE-101:
  * PM: Lola Lee
  * PMM: Mark Zuck
* CORE-230:
  * PM: Lola Lee
  * PMM: John Smith

<!-- -->

* CORE-777:
  * PM: Edward Cullen
  * PMM: Ron Weasley

<!-- -->

* CORE 808:
  * PM: Jane Doe
  * PMM: Ron Weasley

<!-- -->

* CORE-909:
  * PM: Jane Doe
  * PMM: John Smith

Am I able to send 1 email with a summary list to PM Lola that shows CORE-101 and CORE-230 as overdue items that need to be updated and auto-include the respective PMMs (Mark Zuck and John Smith) in that same email?

If so, what steps do I need to take? Screenshots would be appreciated! Thanks in advance!


Answers:
author: Bill Sheboy
body: Hi [@JD](/t5/user/viewprofilepage/user-id/5526444) -- Welcome to the Atlassian Community!

There are several ways to solve this:

* using a saved filter which compares the PM field to [currentUser()](https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#currentUser--) and ask each PM and PMM to subscribe to the filter on their desired cadence: <https://support.atlassian.com/jira-software-cloud/docs/manage-filters/#Subscribe-to-a-filter>
* use an automation rule
* use a marketplace addon / app for reporting

You asked about doing this with an automation rule. Although this question has been asked many times, there is a slight variation to your scenario as you also want to notify the people in the PMM field.

**What have you tried thus far to solve this need?**

* If you have created a rule and it is not working, please post images of your rule, actions, and the audit log details, and explain what does not work as expected. Those will provide context for the community to help.
* If you have not started a rule, I encourage trying to do so. Successfully using automation rules requires learning and experimentation. Just using a rule provided by others without understanding it will make it difficult to maintain and improve. Please review this information to get started: <https://support.atlassian.com/cloud-automation/docs/jira-cloud-automation/>

To help get you started on your rule...

What type of project is this: company-managed or team-managed? You may find that information at the bottom-left of the screen expanding area.

If you are using a team-managed project, and the PM and PMM fields are People fields, the email address will not be available to the rule: <https://jira.atlassian.com/browse/AUTO-519> The workaround for this is to ask your Jira Site Admin add a company-managed custom user fields for use as PM and PMM.

Let's assume that is all resolved, or you are using a company-managed project. Here is an outline and some steps to help with the rule.

* trigger: [scheduled](https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Scheduled), with no JQL
* action: [lookup issues](https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues), with [JQL to find any overdue issues](https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#now--), based on what criteria you use to decide that
* [smart value condition](https://support.atlassian.com/cloud-automation/docs/jira-automation-conditions/#--smart-values---condition): check if {{lookupIssues.size\|0}} is greater than 0
* advanced branch: use an advanced branch to loop over the [distinct](https://support.atlassian.com/cloud-automation/docs/jira-smart-values-lists/#list.distinct) PM values
  * name: varPM
  * smart value: {{lookupIssues.PM.distinct}}
    * action: lookup issues again, with the same JQL, and adding to the end to filter on the PM with *AND PM = {{varPM.accountId}}*
    * action: send email
      * The email recipient will be:
        * {{lookupIssues.first.PM.emailAddress}}
      * But you want to also notify the PMM, and so the other email addresses to include will be:
        * {{lookupIssues.PMM.emailAddress.distinct}}

Kind regards,  
Bill

comments: author: JD
body: Thank you so much Bill! I will test this method!


author: JD
body: This worked great! Thanks so much Bill :) Will also be using this for other automation rules


author: Luis Felipe Studzinski Santos
body: Hi,

My suggestion would be to create a filter like this "project = "SKP" and duedate \>= now() and statusCategory != Done ORDER BY due ASC", or whatever is most appropriate, and create a subscription management for the filter. The recipient group can be created in Jira with the users who should receive the email.

![issue due date.png](https://community.atlassian.com/t5/image/serverpage/image-id/331207i0486272E21065A55/image-size/large?v=v2&px=999 "issue due date.png")![issue overdue.png](https://community.atlassian.com/t5/image/serverpage/image-id/331208iD29811B325F305C4/image-size/large?v=v2&px=999 "issue overdue.png")![overdue subs.png](https://community.atlassian.com/t5/image/serverpage/image-id/331209i650B643483AEFB7E/image-size/large?v=v2&px=999 "overdue subs.png")

This will be the list of overdue issues that will be sent to the email

![resposta.png](https://community.atlassian.com/t5/image/serverpage/image-id/331210i110900EBCB5F7BE0/image-size/large?v=v2&px=999 "resposta.png")

This suggestion does not use automation and can be implemented for several sending intervals.

I hope this helps

comments: author: JD
body: Thanks so much Luis! For the subscription, would it send all issues to the people subscribed? Or can you customize it to make only applicable issues send to the applicable people?


Tags: automation

cloud

jira-cloud