Forums

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

Real work day JQL

Katherine Stevens
Contributor
February 3, 2023

Hi, 

My work times are from 8 - 5pm.  Any ticket that comes in at say 5:01PM needs to be counted on the next day.  So, how do I write a JQL to show me all tickets starting at 5:01PM until 5:00PM the next day?

5 answers

4 accepted

2 votes
Answer accepted
Trudy Claspill
Community Champion
February 3, 2023

You could use this filter:

created >= startOfDay(-7h) and created <= startOfDay(17h)

...to get all the issues created since 5pm yesterday up until 5pm today.

1 vote
Answer accepted
Craig Nodwell
Community Champion
February 4, 2023

Use the jql @Trudy Claspill gave you below.

created >= startOfDay(-7h) and created <= startOfDay(17h)

This will give you what you want, save it as a filter and you can use it in your dashboard gadgets. 

1 vote
Answer accepted
Mikael Sandberg
Community Champion
February 3, 2023

You would have to use a JQL with specific dates and times in order to do it, something like this:

(created >= "2023-02-03 17:01" AND created <= "2023-02-04 17:00")

Katherine Stevens
Contributor
February 3, 2023

I want to put this on my dashboard.  Is there a way for it to automatically change the date each day?

Thanks!

Mikael Sandberg
Community Champion
February 3, 2023

No, because the functions that allow you to get start of day and end of day follows the 24 hour clock. So in order to get issues between 17:01 and 17:00 the next day you have to use specific dates. There are apps in the Marketplace that extends JQL with more features, but I don't know if any of those allows you to search based on working hours.

0 votes
Answer accepted
henry cavill
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 4, 2023

This filter is a possibility:

To obtain all the issues produced from 5 p.m. yesterday until 5 p.m. today, use the criteria created >= startOfDay(-7h) and created = startOfDay(17h).

0 votes
Katherine Stevens
Contributor
February 6, 2023

Thanks everyone!

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