how to set-up simple automation rule to close tickets

Maxime Baudts March 7, 2025

I wanted to set-up a simple automation rule that if a issuetype is in a certain status for 10 days without anyupdate it closes automatically.

 

I tried a bit. but the tickets where closed after being in that status for 1 day. 

 

this is what i set-up:

JQL rule:

project = FUSD AND issuetype in ("Change Request", Incident, "Operational Change") AND status = "Prod - Operational Proving/Live Check" AND updated >= -10d

 

anyone knows what i'm doing wrong.

4 answers

2 votes
Daniel Ajenjo March 7, 2025

Hi @Maxime Baudts 

Your automation rule is failing because the JQL query you used, updated >= -10d, does not select issues that have remained in a state for 10 days without updates. Instead, it selects issues that have been updated in the last 10 days, which is why the rule is triggering earlier than expected.

Solution

 To ensure that the rule only applies to issues that haven’t been updated in the last 10 days, modify your JQL like this:

project = FUSD 
AND issuetype IN ("Change Request", Incident, "Operational Change") 
AND status = "Prod - Operational Test/Live Verification" 
AND updated <= -10d

🔹 Key Difference:

  • updated >= -10d → selects issues updated within the last 10 days
  • updated <= -10d → selects issues not updated for at least 10 days

 Automation Rule Configuration

1. Trigger:

  • Use the “Scheduled” trigger to run the rule daily.
  • Enable the “Run JQL query” option with the corrected query.

2. Action:

  • Use the “Transition issue” action and set it to move the issue to the Closed status.

Before enabling it in production run the JQL query in Jira’s advanced search to verify that it selects the correct issues.

👉 If my answer was helpful, please mark it as accepted! 😊

1 vote
Maxime Baudts March 7, 2025

Hi thx for the asnwer i'll adapt the jql in this way and 'll update in 10 days :D

Daniel Ajenjo March 7, 2025

Perfect! don't forget to mark my answer as accepted if you found it helpful. 😊

1 vote
Valerie Knapp
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 7, 2025

Hi @Maxime Baudts , welcome to the Atlassian Community and thanks for your post.

I have a similar rule in one of my customer instances. I think you have the arrow going the wrong way. When you click on the 'Validate query' option under that box, please can you check you are getting a number of issues retrieved that seems sensible?

You can also copy the JQL and put it into an issue filter, add the 'Updated' column and visually check if the issues you are retrieving with that query are the correct ones to close.

status = "Resolved" and updated < -72h

I hope this helps you but if you have other questions, please don't hesitate to ask.

Cheers

0 votes
Maxime Baudts March 7, 2025

Schermafbeelding 2025-03-07 091352.png

Suggest an answer

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

Atlassian Community Events