Forums

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

JQL resolved >= 2024-01-30 AND resolved <=2024-01-31 not showing proper result

Ashish Bijlwan
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.
February 2, 2024

Hi,

JQL resolved >= 2024-01-30 AND resolved <=2024-01-31 not showing issues that were closed on 2024-01-31. Only showing issues closed on 2024-01-30.

Please can anyone help me in this why this JQL is not working properly.

 

Thank you,
Ashish

2 answers

1 accepted

0 votes
Answer accepted
Mirek
Community Champion
February 2, 2024

Hi @Ashish Bijlwan 

From what I understand you would like to view issues from 30 January and 31 January. 

Are you sure that all the tickets have been properly "resolved"? I by resolved I mean that all tickets have resolution set to something different than None.. Jira is differentiating and setting the resolved date when resolution is set. So you might think that issue is resolved but there is no resolved date set... 

So this is the first thing I would like to check. You can use JQL for that also..

Example (depends which status is the last one when ticket is resolved.. )

status in (Resolved, Done) and resolution IS EMPTY

If you are sure that resolution is set on all issues and resolution date is there then please first verify how many tickets you get from 30 January and how many from 31 January.. 

To be more precise you can use date and time in JQL.. So please run two queries separately

Something like this:

A:  resolved >= "2024-01-30 00:00" and resolved <= "2024-01-30 23:59"

B:  resolved >= "2024-01-31 00:00" and resolved <= "2024-01-31 23:59"

Then count how many issue you have for specific date and give a result when you do 

C: resolved >= "2024-01-30 00:00" and resolved <= "2024-01-31 23:59"

Do you see any differences in results then? 

Ashish Bijlwan
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.
February 2, 2024

Hi @Mirek 

All issues were resolved correctly and have the Resolution as Done

A:  resolved >= "2024-01-30 00:00" and resolved <= "2024-01-30 23:59" = got 30 Results count

B:  resolved >= "2024-01-31 00:00" and resolved <= "2024-01-31 23:59" = got 59 Results count

C: resolved >= "2024-01-30 00:00" and resolved <= "2024-01-31 23:59" = got 89 Results count

Do I need to add the time range as well to get the expected result like  option C?

Please could you help me in understanding why time range is needed to get the expected result and why resolved >= 2024-01-30 AND resolved <=2024-01-31 is not giving the expected result?

 

Thank you,
Ashish

 

Like Mirek likes this
Mirek
Community Champion
February 2, 2024

@Ashish Bijlwan 

Basically if you do not include the time by default it gives you 00:00 so if you define resolved <= 2024-01-31 it means actually <= 2024-01-31 00:00 (which is still 30 January...)

To fix it (without using exact time) you should use one day forward which is 2024-02-01

So final JQL would work as this

resolved >= 2024-01-30 AND resolved <=2024-02-01 

Like Ashish Bijlwan likes this
Ashish Bijlwan
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.
February 2, 2024

Thank you for sharing this info @Mirek 

Like Mirek likes this
0 votes
Aron Gombas _Midori_
Community Champion
February 2, 2024

I don't know why this is not working, maybe a bug in the way Atlassian implemented logical operators.

But if you want the results, instead of knowing the actual root cause, maybe you could test the end of interval differently:

resolved >= 2024-01-30 AND resolved <=2024-02-01 

Ashish Bijlwan
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.
February 2, 2024

Hi @Aron Gombas _Midori_ 

I modified the query i.e., 

resolved >= 2024-01-30 AND resolved <= '2024-01-31 23:59'

and it fixed my issue.

 

 

Like Mirek likes this

Suggest an answer

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

Atlassian Community Events