Get all issues with status open and created date less than given date?

Laxminarsaiah Ragi December 10, 2019

Hi There,

I have to generate a Jira report every day at 12 am, for that I am preparing below JQL queries

I want to get all open issues from 2019-12-09 23:59 if report runs on 2019-12-10 00:00

Case#1:  

JQL = project = "RLN" AND status not in ("Closed","Resolved","Done") AND created <= "-1d"

Q1.  Can anyone please explain the query?

Q2. how the date calculated if we give -1d

Case#2

jql = project = "RLN" AND status not in ("Closed","Resolved","Done") AND created <= "2019-12-09 23:59"

Q1. if i use this query i am getting records 2019-12-10 onwards which are not expected results

 

Thanks

Laxmi

 

1 answer

1 vote
Gikku
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.
December 10, 2019

Hi @Laxminarsaiah Ragi 

You can write the query as below to generate the reports for issue created on last day, this can be run at any time on the day

created >= startOfDay(-1d) and created < startOfDay() ORDER BY created DESC

startOfDay() automatically sets the time at 12am for the day

 

For the case 2#, try using the format as below

created < "2019/12/09 23:59"

Suggest an answer

Log in or Sign up to answer