Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,299,120
Community Members
 
Community Events
165
Community Groups

Automation JQL: actions based on time tickets remain in a certain status

Edited

Hi,

I need to create automation/s that will run a JQL and take certain actions based on the criteria below and I was wondering what your thoughts would be on how to implement this - or the best way to do it.

Here are the requirements:

Severity 1/2 tickets:

- Check for Sev 1/2 tickets that are in "Awaiting Customer" and have remained in this status for 9 hours => ACTION: make a comment to the ticket

- Check for Sev 1/2 tickets that are in "Awaiting Customer" and have remained in this status for 14 hours => ACTION: move to status "Awaiting Customer Closure"

- Check for Sev 1/2 tickets that are in "Awaiting Customer" and have remained in this status for 168 hours => ACTION: close ticket.

 

Severity 3 tickets (the only thing that changes is the number of hours):

- Check for Sev 3 tickets that are in "Awaiting Customer" and have remained in this status for 43 hours => ACTION: make a comment to the ticket

- Check for Sev 3 tickets that are in "Awaiting Customer" and have remained in this status for 91 hours => ACTION: move to status "Awaiting Customer Closure"

- Check for Sev 3 tickets that are in "Awaiting Customer" and have remained in this status for 259 hours => ACTION: close ticket.

 

Potential Solution:

Create 3 separate scheduled automations: one to comment on tickets based on the number of hours and severity, one to change their status based on the number of hours and severity, and another one to close the ticket based on the same criteria.

 

JQL:

If I say "project = XYZ AND status = "Awaiting Customer" AND NOT status CHANGED AFTER -9h", this doesn't necessarily mean the results will contain tickets that have remained in the "Awaiting Customer" status for 9 hours, but it seems instead it's returning the tickets in this status that haven't changed status in the last 9 hours. Is that a correct assumption?

So I'm trying to use "status CHANGED" but it seems this is only querying a timeframe for when the ticket hasn't changed based on "going back in time" in relation to today's date instead of how long has the ticket actually remained in that status. And I think the latter is relevant when this automation will be running the first time over a large amount of Sev 1/2 tickets that have actually been sitting there in that status for a longer period of time (>9 or 14 hours). 

It seems there are two perspectives here when I look at a ticket as follows:

1. Has this ticket changed in the last 9 hours?

2. Has this ticket remained in this status for 9 hours?

Does this make sense? Does it actually make any difference when I'll be running my queries against a backlog of tickets for the first time?

 

Any insights on solutions here will be greatly appreciated!

1 answer

1 accepted

0 votes
Answer accepted

Hi Ricardo!

It looks like you know what you are doing here. Let me see if I can help with your JQL.

project = XYZ AND status changed to "Awaiting Customer" after -9h

This seems like it should work. Let me know.

Thanks, Garret.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you