Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • How to set up an automation which emails users when the ticket expiry date is within the next 7 days

How to set up an automation which emails users when the ticket expiry date is within the next 7 days

Kara Nadarajah
Contributor
August 25, 2026

I have an automation set up to run once a week which emails the reporter when the expiry date on a ticket is within the next 7 days. However, when it runs it is notifying users about tickets where the expiry date is more than 7 days in the future. What am I doing wrong? I thought I might be using > instead of < but when I looked at switching that around it looked like this might result in emailing users where the expiry date is in the past. The numberOfDaysBeforeDueInclusion variable is set to 7.

Screenshot 2026-08-25 at 09.38.10.png

3 answers

4 votes
Thorsten Letschert _Decadis AG_
Community Champion
August 25, 2026

Hey @Kara Nadarajah,

While there are already good answers regarding a suitable JQL, allow me the question, why you want to use an automation rule instead of (the admittedly often overlooked) filter subscriptions? 

In your scenario, you'd have to include something like

reporter = currentUser()

 in your query and subscribe a user group to this filter running at your preferred schedule. No automation limit consumption etc.

Kara Nadarajah
Contributor
August 25, 2026

Thanks, there is another section not in the screenshot which deals with who gets emailed. I am not sure what you mean about filter subscriptions, I have never used them and don't know how they work. IIRC I set this up using a template and then amended it.

Thorsten Letschert _Decadis AG_
Community Champion
August 25, 2026
2 votes
Charlie Misonne
Community Champion
August 25, 2026

Hi @Kara Nadarajah 

>= endOfDay(7) will indeed return dates more than 7 days from now.

What you need is this:

<= endOfDay(7): everything with a date less than 7 days from now. But this will include items in the past.

So combine with "Expiry date[Date]"  >= now() to get future items only.

Result:

"Expiry date[Date]" >= now() and "Expiry date[Date]" <= endOfDay(7)

 

1 vote
Marc -Devoteam-
Community Champion
August 25, 2026

Hi @Kara Nadarajah 

There is an easy way to do this.

I see use the field "Expiry date" to look at.

In your lookup use the clause: 

"Expiry date" = "{{now.plusDays(7).jiraDate}}"

Then branch over {{lookupIssues}} and sent a mail in the branch.

This will find all work items with an Expiry date set 7 days from now and for each wotk item sent an email

Charlie Misonne
Community Champion
August 25, 2026

This is a good solution using smart values!

But the trigger of the rule is once a week. If you want to do an exact date match like that you should run the rule every day. So pay attention to that.

Marc -Devoteam-
Community Champion
August 25, 2026

HI @Charlie Misonne 

Correct.

Then you could set 

"Expiry date"  >= "{{now().jiraDate}}" and "Expiry date"  <= "{{now.plusDays(7).jiraDate}}"

 

Like Charlie Misonne likes this

Suggest an answer

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

Atlassian Community Events