Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

JQL to show overdue Issues plus Issues that have a Due date within the next 7 days

Brad Mancini November 25, 2023 edited

Hi team,

The following JQL filter does not achieve what we were hoping:

 

duedate < startOfDay(7d) AND resolution = Unresolved

 

This is used as a Quick Filter on a Board.  The intent was to show only overdue Issues and Issues that have a Due date within the next 7 days. 

 

Unfortunately Issues show up with no "Due date" defined:

Screenshot 2023-11-26 at 05.42.17.png

Do you know what I'm doing wrong?

 

Many thanks,

Brad

2 answers

2 accepted

1 vote
Answer accepted
Ste Wright
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2023 edited

Hi @Brad Mancini 

This should work, because it needs a due date to be populated to work:

resolution is EMPTY AND duedate <= 7d

But if it doesn't, specifically state the due date can't be empty:

resolution is EMPTY AND duedate is not EMPTY AND duedate <= 7d

Ste

Brad Mancini November 25, 2023

Thanks Stephen! 

I found that the main issue was that the Due Date displayed on the Default Issue Screen was not the right one.  I swapped this field with the correct "system" Due Date and all was behaving as expected.  The following JQL is working perfectly now:

resolution = Unresolved AND duedate is not EMPTY AND duedate < startOfDay(7d)

Thanks again.

Cheers,

Brad

Like Ste Wright likes this
0 votes
Answer accepted
Walter Buggenhout
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2023

Hi @Brad Mancini and welcome to the Community!

You should be able to work around that by adding an explicit clause to exclude these empty items:

Resolution = Unresolved AND (duedate IS NOT EMPTY OR duedate < startOFDay(7d))

Hope this helps!

Brad Mancini November 25, 2023

Thanks so much for your reply Walter.  

Great idea regarding "duedate IS NOT EMPTY".  I added this :-)

It ended up being slightly more complicated.  I found that the Due Date that was displayed on the Issue screen was NOT the system Due Date.  It seems to be a custom field.  I have no idea why it was there.  You can see in the Configuration of the Default Issue Screen there were TWO Due Dates.  That's a nice way to get confused ;-) 

Screenshot 2023-11-26 at 09.49.43.png

I swapped these Due Dates - and now use the "system" Due Date. 

I ended up with the following, which works now.

resolution = Unresolved AND duedate is not EMPTY AND duedate < startOfDay(7d)

Thanks again for your help Walter.

Have an awesome day.

Best regards,

Brad

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
atlassian, ace, atlassian community event, donation, girls who code, women in tech, malala fund, plan international, kudos, community badge, badge, atlassian badge, International Women’s month, International Women’s Day, women's month, women's day

10 for Change at Atlassian Community Events

Show up and give back by attending an Atlassian Community Event: we’ll donate $10 for every event attendee in March!

Join an Atlassian Community Event!
AUG Leaders

Upcoming Jira Events