Forums

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

JQL to Find Tickets Where Status Changed During Specific Timeframe - Dynamic

Joel Lepp
Contributor
November 15, 2018

I'm trying to write a query that will return tickets where the status changed to a specific status at somepoint between a specific day and time of the week and another day and time of the week.

Example:
I want to find all tickets that were changed to a status of "Deployed" by the current user between Thursday @ 2:00pm of the previous week and Thursday @ 1:59pm of the current week.

Below is what I think I have is right, although I don't know that I have my number of days correctly.

type = "Bug" AND status changed to (Deployed) by currentUser() during (startOfWeek(-3d), endOfWeek(-2d))

Is there a way to state (-3d) + (-10h), or (-3d) 14:00?

Maybe the solution is to figure out the exact number of hours?

1 answer

1 accepted

0 votes
Answer accepted
Raynard Rhodes
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.
November 15, 2018

believe you can do the same thing for the -3d but instead of d use h for hour. 

I believe time starts at 00:00 so if you do startOfWeek(1h) it should look at Sunday (startofwork) 1 hour in, so 1am Sunday. so 10h should be 10 am etc. I am a bit fuzzy on that but it seems good.

Joel Lepp
Contributor
November 15, 2018

That's what I'm finding out. Instead of using -3d, I'm using -60h to get to the specific time of how many days ago I want to look at. If no one else comes up with something better, I'll accept your answer.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events