Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automation to Generate Reminder Emails at the Beginning of the Week

Ivan Garcia June 9, 2025

Hi all, I'm trying to utilize the template in the rule builder that will send an email to the Reporter at the beginning of the week when a due date is within 5 days. For whatever reason, the rule either does not trigger or I receive an error in the audit log. 

Curious if anyone more savvy than I can help me resolve this.


Screenshot 2025-06-09 120213_1.pngScreenshot 2025-06-09 120213_2.pngScreenshot 2025-06-09 120213_3.png

For clarity on the following section, I tried to create it as a section of the rule that will read tasks/subtasks that are due within 5 days and the status is NOT Done or Accepted, and the assignee has been set.

 

Lookup issues

duedate <= endOfDay(5) AND statusCategory != done OR statusCategory != accepted AND assignee = {{distinctAssignee}}

 

I'm hoping this rule will help empower my team to manage their teams better at the beginning of the week. Thank you!

2 answers

1 vote
Bill Sheboy
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.
June 9, 2025

Hi @Ivan Garcia 

There are several problems with the rule you show, and I recommend pausing to instead start with this example from the knowledgebase, adjusting the JQL to your needs.  It is quite similar to your scenario.

https://support.atlassian.com/automation/kb/automation-rule-to-send-single-email-for-all-issues-per-assignee-due-next/

 

FYIs for your specific rule shown:

  • The rule uses a Scheduled trigger with no JQL, but the rule references conditions, branches, and actions as if there is an issue in scope.  Using the Lookup Issues action just returns data, not issues to act upon.  That is what the warnings mean in the rule editor.
  • Your Lookup Issues action uses JQL containing smart values, but there are no sources for those smart values.

 

Kind regards,
Bill

Ivan Garcia June 10, 2025

Hi @Bill Sheboy , thank you for your input. I referenced the scenario you linked and applied the some of the content to my use-case. 

Screenshot 2025-06-10 131923.png

Though I seem to be running into 2 errors: 1 for an invalid resolution value (which ACCEPTED and DONE does indeed exist in the project. And the other appears to be an error with the smart value in relation to an object. Maybe the latter is the thing I'm not understanding, is distinctReporter not a proper value to use?

Screenshot 2025-06-10 132705.png

Bill Sheboy
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.
June 10, 2025

I recommend first trying that JQL outside of the rule, with Search Work Items / Issues.  Then when the JQL works, update the rule to use that.

 

While doing that, please confirm with example work items that in project CI, those Resolution values actually exist.

 

And, to prevent that error for the Advanced Branch when the lookup returned no issues, you may precede it with a Smart Values Condition:

  • ...
  • lookup issues...
  • smart values condition:
    • first value: {{lookupIssues.size|0}}
    • condition: greater than
    • second value: 0
  • advanced branch
    • ...

 

Ivan Garcia June 16, 2025

Thank you @Bill Sheboy

I think I've made some progress with the automation and came up with the following:


Screenshot 2025-06-16 115017.png

 

The only issue I'm now currently running into is a JQL error in the definition of the timeframe of the due date. Trying to set it to read the due date and include the task/subtask if the due date is within the 5 day window. I would imagine I just need to remove the '+'

status in ('To Do', 'In Progress') AND due <= endOfDay(+5)

I tried a previous iteration of this rule and received a successful email, though it sent 1 email per task and subtask, which resulted in hundreds of reminder emails, I hope the following will result in 1 email per unique reporter outlining all tasks/subtasks in scope:

Hello {{issue.reporter.displayName}},

Here are your tasks and subtasks that are either 'To Do' or 'In Progress' and have a due date approaching within the next 5 days:

{{#lookupIssues}}
- Summary: {{summary}}
Issue ID: {{key}}
URL: {{url}}
Assignee: {{assignee.displayName}}
{{/lookupIssues}}

Best regards,
Your Jira Automation



Bill Sheboy
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.
June 16, 2025

First, please see the documentation for that JQL function as you are missing the quotation marks for the date increment:

https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#endOfDay--

 

Next, in your advanced branch, I recommend not using a variable name which can match the built in ones.  That is, use varIssue rather than issue.

And note that is just data, and not an actual issue when branched in this way.

 

Finally, please carefully re-read that knowledgebase article for sending one email per user.  Without seeing the details of your Scheduled trigger, it appears to also be using JQL and so the rule will not work as you described:

I tried a previous iteration of this rule and received a successful email, though it sent 1 email per task and subtask, which resulted in hundreds of reminder emails, I hope the following will result in 1 email per unique reporter outlining all tasks/subtasks in scope

As a reminder, here is that article link:

https://support.atlassian.com/automation/kb/automation-rule-to-send-single-email-for-all-issues-per-assignee-due-next/

0 votes
arielei
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.
June 9, 2025

Hello @Ivan Garcia

First you are using the "lookup work-items" and you are not using them after that in your conditions.

so first, you'll need to switch all conditions to use smart-values, for example:
{{lookupIssues.issueType.name}} equal Task

you'll have to surround it with IF-ELSE as you'll need multiple conditions.

 

for the not triggering part - probably check your trigger at the bottom, uncheck: Only include work items that have changed since the last time this rule executed

 

So this will fix your problem.

Hope that helps.

Ariel.

Suggest an answer

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

Atlassian Community Events