I'd like to send an email daily that checks for issues that are older than 5 days and emails a list of the issues in that status to the reporter of the issue. So far I've managed to get a list emails but the users are getting an email for each issue that is older than 5 days. Ideally if they have 1 or 50 that are older than 5 days I'd like them to get one email instead of one for each issue. Also, if it only works if I have Run a JQL search and execute for each issue checked and the JQL I'm using for the next step in the scheduled step
Right now I have:
When:Scheduled
9:00 AM daily
JQL:project = "User issues" and status = "Issue set" and updated < -5d and "LTO [Checkboxes]" is EMPTY
Then: Lookup issues
JQL:project = "User issues" and status = "Issue set" and updated < -5d and "LTO [Checkboxes]" is EMPTY
And:Send Email
You have issues open longer than 5 days. Please check your issue requests and close any finished overrides. If you need to extend please check the LTO checkbox in the issue on the right column
{{#lookupIssues}}
* Issue Key: <b>{{key}}</b> (<a>{{url}}</a>)
* Summary: <a>{{Summary}}</a>
*Reporter: <b>{{issue.reporter.displayname}}</b>
{{/}}
The above works but all reporters get an email for each item that matches.
If I take the JQL out of step 1 then it fails
Would like to have it send one email per reporter if they have 1 or more issues.
Hi @Dennis_H
For scenarios when you want one email for something, try this without JQL in the scheduled trigger. Instead, only use the Lookup Issues action to rollup the results.
And just to confirm: did you want to check for "in this status for more than 5 days" or "not updated in last 5 days". If it is the first one...you may want to use the CHANGED JQL operator to focus on status values not changing, rather than just checking updated: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CHANGED
For example, like below. Please adjust to meet your specific case.
project = myProject
AND statusCategory = "In Progress"
AND NOT status CHANGED AFTER -5d
ORDER BY reporter
Putting that together with some rule adjustments like this:
Note this has a limit of 100 issues for automation rule actions.
Kind regards,
Bill
In the "To" field for the email I also tried:
{{lookupissues.reporter.displayName}} and got an error that the To field is empty. In the body of the email it displays the reporter when I use that exact same line
{{#lookupIssues}}
* Issue Key: <b>{{key}}</b> (<a>{{url}}</a>)
* Summary: <a>{{Summary}}</a>
* Reporter: <b>{{reporter.displayName}}</b>
*Email: <b>{{reporter.emailAddress}}</b>
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.