i want to write a JQL to know all issues for which due date <= (start of day+7)

pragati bhatia May 6, 2019

basically I want to know through JQL all issues that are due in coming 7 days. any leads?

3 answers

2 accepted

3 votes
Answer accepted
pragati bhatia May 6, 2019
due >= startOfDay() AND due <= 7d 
Julia Anderson August 8, 2022

This ended up working for me

due <= startOfDay() OR due <= 7d
0 votes
Answer accepted
Bogdan Gorka
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 6, 2019

Use the simple search engine and select your options

2019-05-06 10_10_43-Window.png

Then, if you select the Advanced option, you will see how it translates into JQL.

In my example it was:

project = DMP AND due <= 7d

 More about comparing fields with operators can be found here: https://confluence.atlassian.com/jirasoftwarecloud/advanced-searching-operators-reference-764478341.html

Merve Nur Bas
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 6, 2019

Hey @pragati bhatia ,

 

"due <= 7d" will show every issue due in the upcoming 7 days and overdue ones. Try the following JQL for a range between today and the next 7 days. 

 

due >= startOfDay() AND due <= 7d

 

With that being said, it is always a good option to try the simple search first and adjust the resulting JQL like @Bogdan Gorka explained. 

 

Regards

Like # people like this
Bogdan Gorka
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 6, 2019

Thanks @Merve Nur Bas I have learnt something too.

To exclude overdue issues I would normally use due >= "0" AND due <= 7d but I am not sure if the the "0" means start of the day or the moment the JQL is executed. So, to be 100% sure, it is better to use startOfDay().

More about avanced search functions can be found here:

https://confluence.atlassian.com/jiracorecloud/advanced-searching-functions-reference-765593719.html

Like pragati bhatia likes this
pragati bhatia May 6, 2019

@Bogdan Gorka  Thanks this solved my problem. I was getting overdue issues as well  when I used @Merve Nur Bas  suggestion.

 

due >= startOfDay() AND due <= 7d 

this works well for me :) 

Like Ysaac James Salao likes this
0 votes
Bogdan Gorka
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 6, 2019

Happy to help. Please use the green button Accept Answer so others know that this solution worked for you :-)

Suggest an answer

Log in or Sign up to answer