Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to get results of tickets not updated in the past 4 hours

Vinod Madhappan November 25, 2020

I need to write a JQL ticket to get the results of tickets which has no updates in the last 4 hours.

 

project in ("ABC") AND status not in (Closed, Cancelled) AND priority in (Blocker, Critical) AND updated > -4h AND type not in ("Deployment Request", "Operational Request") ORDER BY updated DESC

 

Please help me if this query is correct?

 

Or it should be 

 

project in ("ABC") AND status not in (Closed, Cancelled) AND priority in (Blocker, Critical) AND updated < -4h AND type not in ("Deployment Request", "Operational Request") ORDER BY updated DESC

3 answers

Walter Buggenhout
Community Champion
November 25, 2020

Hi @Vinod Madhappan,

The 2nd one is correct. With some minor tweaks:

Project = "ABC" AND status not in (Closed, Cancelled) AND priority in (Blocker, Critical) AND updated < -4h AND type not in ("Deployment Request", "Operational Request") ORDER BY updated DESC

Updated < -4h means last update smaller than 4 hours ago

Vinod Madhappan November 25, 2020

Thanks @Walter Buggenhout : The use of  -(Minus) symbol confuses. When i try this  updated > 4h am not getting any result whereas we get results for  updated < -4h

Both are same right? why is not working with updated > 4h ?? @Walter Buggenhout 

Walter Buggenhout
Community Champion
November 25, 2020

I am resuming your last question in here, @Vinod Madhappan

If i try the same with updated > 4h , the query does not fetch me any result where as when i try with updated < -4h am able to get the result. Both are same right?

Why does it not work with  updated > 4h ?? @Walter Buggenhout _ACA IT_ 

Following the same example we used before, let me lay out the example again:

  • We'll assume again that now is 9 PM
  • 9 PM + 4 hours (4h) would be 1 AM the next day (this is in the future)
  • Your ticket was last updated at 4 PM, which is before 5 PM today

As no tickets can be updated at a point in time that is still to come, your query returns no results.

Jack Brickey
Community Champion
November 25, 2020

well > 4h is a Project Managers Dream! That will tell you which issues will be update in the future 4 hours from now and beyond.

future.jpg

Like # people like this
Dave Liao
Community Champion
November 25, 2020

@Jack Brickey - with machine learning, I'm sure it will be possible to have predictive JQL results. Is there a JAC ticket for this? I'd vote that up with my many Atlassian IDs. 😏

#jokes

0 votes
Walter Buggenhout
Community Champion
November 25, 2020

Yes. That means that the update was longer in the past than 4 hours ago, right?

  • In your example, let's assume that now is 9 PM
  • 9 PM - 4 hours (-4h) would be 5 PM
  • Your ticket was last updated at 4 PM, which is before 5 PM

=> updated < -4h will show you the ticket. Updated is the system date of the last ticket update.

Vinod Madhappan November 25, 2020

@Walter Buggenhout : Thanks the -(minus) symbol confuses.

 

If i try the same with updated > 4h , the query does not fetch me any result where as when i try with updated < -4h am able to get the result. Both are same right?

Why does it not work with  updated > 4h ?? @Walter Buggenhout 

0 votes
Vinod Madhappan November 25, 2020

@Walter Buggenhout : Am little confused now with this reply.

"Updated < -4h means last update smaller than 4 hours ago"

 

I need to get a result of tickets which is not updated in the past 4 hours. For ex: If a ticket is updated 4 PM, and if i run a query at 9 PM i need to have that ticket in my query.

Suggest an answer

Log in or Sign up to answer