Forums

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

JQL query return Incorrect data

Tehmina Aslam
Contributor
January 16, 2023

Hi,

I want to get the issues updated or created yesterday in Jira; today is January 16. I have added a query. 

project = "Jeeny Reboot" AND (created < endOfDay(-1) OR updated < endOfDay(-1))

 But the query returns me the issue created or updated by today or even created or updated by the 12th of January. Why is this happening? 

 

Thanks in advance,

2023-01-16_14h22_18.png

3 answers

2 accepted

2 votes
Answer accepted
Alex Koxaras _Relational_
Community Champion
January 16, 2023

Hi @Tehmina Aslam 

Please try something along the following lines:

project = "Jeeny Reboot" AND ((created >= startOfDay(-1) AND created <= endOfDay(-1)) OR (updated >= startOfDay(-1) AND updated <= endOfDay(-1)))
0 votes
Answer accepted
Walter Buggenhout
Community Champion
January 16, 2023

Hi @Tehmina Aslam,

You'll need to add the start of the day as well in order to restrict your search to just yesterday. Try the following instead:

project = "Jeeny Reboot" AND
((created >= startOfDay(-1) AND created <= endOfDay(-1)) OR
(updated >= startOfDay(-1) AND updated <= endOfDay(-1)))

 Hope this helps!

Tehmina Aslam
Contributor
January 16, 2023

Superb @Walter Buggenhout let me try that.

0 votes
Sushant Verma
Community Champion
January 16, 2023

Hi @Tehmina Aslam 

Please try below JQL:

project = "Jeeny Reboot" AND ((created >= startOfDay(-1) AND created <= endOfDay(-1)) OR (updated >= startOfDay(-1) AND updated <= endOfDay(-1)))


Regards,
Sushant Verma

Tehmina Aslam
Contributor
January 17, 2023

Thanks, @Sushant Verma. Works!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events