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.



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 ...



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!


Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in United States

Topic Tuesday: What's your favorite topic?

Good morning All, Our goal is to get you into the habit of while enjoying your favorite morning drink you are checking the NOVA "space" for topics and comments. Your input is really needed and...

57 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