JIRA automation to send an email notification 3 days due

jasonwongys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2025

Hi experts,

I am new to jira automation here. I am testing a automation to schedule send an email notification to reporter after 3 days the issue is due, But i am unable to figure out which IF condition to use or to use a JQL to test out the schedule trigger if it works. Appreciate your reply and thanks in advance.

I have checked the forum posts on a similiar issue using JQL: due < 3d and due > now() but having issues as well
jiraIssue.png

 

 

4 answers

1 accepted

2 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 17, 2025

Hi @jasonwongys and welcome to the Community!

First of all, you can add your JQL statement directly to a field in your scheduled trigger. You would not need to add an additional IF condition anymore.

Try a JQL like this:

due >= now() and due < 3d and statusCategory != Done and Assignee IS NOT empty

I would also strongly recommend a couple of additional tweaks:

  • add a label to the issues you send a notification for to indicate reminders have been sent and exclude the labeled issues from your filter. Otherwise, you risk sending out notification emails for them every five minutes for 3 days on end.
  • ask yourself it is really necessary to send out reminders every 5 minutes. Unless this is a setting you currently use for testing your rule, this may have an impact on the maximum number of rule executions your Jira plan supports.

Hope this helps!

jasonwongys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2025

Thanks Walter, the JQL works. While testing, i changed the JQL to assignee = "{myidname}" just to test the schedule function, i clicked run rules and when i checked my audit log it shows, NO ACTIONS PERFORMED. The assignee is myself

May i know the reason why even though the JQL matches the condition? 

1 vote
Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2025

Rather than using automation you could just create a filter then add a subscription to that filter:

First ask your Site Admin to set up a Jira group e.g. 'Jira-developers' and assign everyone you want to receive the reminder to that group

Then create and save a filter using the following JQL:

assignee = currentuser() and duedate <= endOfDay(3d) and statusCategory != Done

Finally click on 'Filter subscriptions' next to the saved filter name and from the popup add a subscription with the recipients being 'Jira-developers', set up a daily schedule for email reminders (but make sure not to check the box for 'Email this filter, even if there are no issues found')

 

jasonwongys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2025

I am using automation because eventually i would want to transition the issue to a Closed status. I have explored subscription before but thanks for the suggestion Stephen! 

My case study here is to tackle the issue where status under "User clarification" but users are not closing the issues on time, therefore instead of emailing them individually, i am automating this part as a reminder and if there are no action taken within 3 days. I will need to Closed the issues automatically. 

0 votes
Vishal Biyani
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.
February 18, 2025

@jasonwongys 

You can use the smart value {{issue.duedate.diff(now).days}} and it is > 3, then for such issues you can send out the email.

You will need to add a lookup action with JQL and then using below logic inside mail body, you can filter out the issues.

{{#lookupIssues}}
{{#if (due date.diff(now).days) > 3}}

...

{{/}}

{{/}}

jasonwongys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2025

Will test this out. Thanks Vishal!

0 votes
Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2025

Hi @jasonwongys 

The JQL that @Walter Buggenhout suggested should do what you want, and although you could take his advice on including the JQL in the scheduled trigger I would suggest keeping it as a separate IF statement (at least while you are testing the automation.)

For testing the automation I would also suggest changing the trigger to a manual trigger that you can run from any existing issue rather than having to wait 5 minutes for the scheduled trigger to run.

When you have finished testing change the trigger back to a scheduled trigger running once a day before the working day starts, e.g. at 5am.

jasonwongys
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 18, 2025

Point taken Stephen, as a newbie, i was trying out the schedule trigger and never managed to get it to work. 

Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 18, 2025

What may help is logging actions, for example when I want to test out IF statements without the next step I use a Log Actions action to log something like 'Condition passed' then you can test and modify the IF statement without doing something like sending an email or transitioning the status

Like jasonwongys likes this

Suggest an answer

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

Atlassian Community Events