Auto closing tickets after 5 days

Tylor Seastrum
Contributor
September 17, 2024

Hey Atlassian Community, 

I am trying to put together an automation that will auto close (or switch the status to "Resolved")

I have a project called: "IT Service Desk v2"

I was thinking about running this automation every day in the morning around 5am.

I was thinking about using the following JQL with the "When: Scheduled" event. I am concerned that this mean after 5 days of the ticket getting any updates however which means my IT Service Desk agents on the ticket and reaching out would reset the timer. If I can add an exception group that would be great. If I am wrong please 
JQL: project = 'IT Service Desk v2' AND status = 'waiting on employee' AND updated <= -5d


I am stuck on being able to get jira to know when the ticket has been sitting on "waiting on employee" for 5 days in order to close. When an employee responds to one of our tickets it switches out of "waiting for employee" (not sure if this is a global ITSD project setting or due to one of our automations) I am fairly new to the Atlassian community as a system engineer and would appreciate any help. Thanks

 

 

1 answer

0 votes
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.
September 17, 2024

Hi @Tylor Seastrum 

One way to do this is with the CHANGED JQL operator: https://support.atlassian.com/jira-software-cloud/docs/jql-operators/#CHANGED

For example:

project = "IT Service Desk v2"
AND status = "waiting on employee"
AND NOT status CHANGED AFTER -5d
ORDER BY Key ASC

This would check that the status has not changed in the last 5 days.

 

Kind regards,
Bill

Tylor Seastrum
Contributor
September 17, 2024

Good morning Bill, 

Thank you for your reply I will read up on those operators. I was curious if I needed to supply any additional information for the Key or ASC at the end of that JQL or if that is fine as is? Thanks again!

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.
September 17, 2024

Based on what you described, that expression should work.  I only put the ORDER BY on there out of habit (rather than letting it be random).

I recommend trying the JQL standalone with Filters > View All Issues, and compare results to what you expected to see.  Then adjust the query to meet your needs.

Tylor Seastrum
Contributor
September 17, 2024

That's a great tip I hadn't thought about testing my JQL through filters. Thank you for your help! I will do some testing and then updated this thread once I have the results.

Like Bill Sheboy likes this
Tylor Seastrum
Contributor
October 10, 2024

I ended up creating an SLA to keep track of the 40 hours that past. Then I created an automation that when SLA breached close ticket.

Like Bill Sheboy likes this

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