JQL query to get all tasks that will expire in X days

Hi guys,

I can assure you that this is a last resort. I've tried so many different permutations of JQL to achieve what I want and have searched endlessly to no avail.

I'm trying to do something very simple - get a list of JIRAs whose due date is X number of days from today's date.

I believe it's something along the lines of:

project = proj-name and due > "2d"

I can get all tasks that are past their due date by using:

project = proj-name and due < now()

That works, but whatever I use ("-2d", reverse the brackets, remove the quotes, whatever) in the first query I still get back JIRAs in my result set that are NOT due in 2 days. I'm getting JIRAs back that have due dates MONTHS into the future.

Any help would be appreciated.

Regards,

Lee

2 answers

2 votes

How about this?

project = proj-name and due &gt; now() and due &lt; 2d

This will get you the issues due between now and 2 days from now.

Thanks Jobin,

Unfortunately this brings back no issues. I'm starting to think there is something wrong with my JIRA date settings ...

Regards,

Lee

I would increase the number of days from 2 to 10 just to make sure there are issues due in that time frame. Also try a full reindexing to check if the indexes are broken or not.

Also, make sure you have the standard due date populated and it is not any custom field.

Looks like the indexes were broken!

Thanks, that's fixed it!

Lee

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 16 hours ago in United States

Atlassian acquires AgileCraft

         Good Day, Bad bad traffic, not sure why!!!! 1/2 hour commute took me 2 hours today 🤯 What helped me is that I kept browsing LinkedIn until...

49 views 4 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you