Forums

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

Query for changing status hours and days after effective date

Ravi Mistry
Contributor
February 13, 2019

Hi guys, 

 

I need to three queries but i am a bit stuck on best query to use.

 

I need a query for the following:- 

 

1) Something that has been less than 18 hours ago

Currently my JQL is this :-  

project = SF AND issuetype in ("Bug - Dev", "Bug - FE", Improvement) AND status = "To Start" AND created >= -18h order by created DESC 

 

I believe the above is correct however would like to know if there is anything i have missed.

 

2) Something that has been created more than 24 hours ago

project = SF AND issuetype in ("Bug - Dev", "Bug - FE", Improvement) AND status = "To Start" AND created >= -1d order by created DESC 

Is the above correct? 

3) Something that has been created between 18 and 24 hours ago 

project = SF AND issuetype in ("Bug - Dev", "Bug - FE", Improvement) AND status = "To Start" AND created >= 18h AND created <= 24h order by created DESC  

 

Is the above correct for what i am trying to achieve as i'm not sure how range area works? 

 

Please let me know :) 

 

Thanks, 

 

Ravi

1 answer

1 accepted

0 votes
Answer accepted
Merle Fischer
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.
February 13, 2019

Hi Ravi,

1 is correct, for 2 your query is returning what was created in the last 24 hours, if you are trying to get at what was created before 24hours, you have to change it so "created<=-1d" (the negative makes this a bit confusing sometimes ;)...)

as for your query number 3, if you want to get at what was created more than 18 hours ago but before 24 hours ago, you need to change you query to "created <= -18h AND created >= -24h"

unless my logic in negative numbers is also failing me now. Let me knwo if this worked for you, cheers

Merle

Ravi Mistry
Contributor
February 13, 2019

Perfect, I think query 3 from what you have said is what i'm after and it's working! Regarding 24 hours i think the query is correct as we want to show issues that have been in the system more than 24 hours. 

Merle Fischer
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.
February 13, 2019

glad I could help ;)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events