Forums

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

JQL for issues created between 22:00 & 00:00 from January 1st

Jakob KN
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.
May 25, 2020

Hi Community, 

I'm looking for a way to get all issues in a specific project, where an event took place in the time between 22 and midnight, since January 1st. 
The specific events i'm looking for, are Created, Resolved and SLA breached.

I'm trying with the following JQL, but it only returns issues created either after 22 yesterday or during today.
project = XYZ AND created >= 2020-01-01 AND created > startOfDay("-2h")

The JQL is only returning issues which applies to "> startOfDay("-2h")", is there a way to apply the startofday condition to all issues from 1st January, and not just current day?

1 answer

1 accepted

0 votes
Answer accepted
Jack Brickey
Community Champion
May 25, 2020

I do not think this is possible OOTB. Here is a suggestion you may wish to vote/watch - JRASERVER-70201 

you can run a daily query if you like.

Jakob KN
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.
May 25, 2020

Ah! i see. Thanks Jack. 

What i need is to look retrospectively for creation/resolution of tickets for the year, so a daily subscription filter or similar isn't providing enough statistical data unfortunately. 

Do you know if it's possible to search for issues created between 22 and 00 without specifying a date?
I know this would return issues since the beginning of time, but I could work with that if it's possible.

Jack Brickey
Community Champion
May 25, 2020

Not OOTB. If you were on Cloud I would suggest trying to form an Automation rule that sets a field based on creation time then use that field to find all issues with the value set to equate to the time period.

Jakob KN
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.
May 25, 2020

Good point! 

We've got both Automation for Jira and Scriptrunner, so that could be an option. 

Jack Brickey
Community Champion
May 25, 2020

For sure with those two you can make it happen.

Suggest an answer

Log in or Sign up to answer