Forums

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

Date Range JQL Query is not working

Shah Baloch
Contributor
April 6, 2022

I'm trying to create a couple of filters to pull issues that were created 15 days ago and equal to or less than 45 days. The date range query is not pulling all issues that were created between 15 days to 45days from now. It is just pulling the issues that create 15 days ago or the last two weeks.  I tried below both queries and had no luck. How can pull up issue from that range without specifying the date? I would like to add the filter in a dashboard and can't update the date every day.

created >= "-15d" AND created <= "45d"

created >= "-2w 0d 0h" AND created <= "6w 3d 0h"

Thank you for your help.

 

 

1 answer

1 accepted

1 vote
Answer accepted
Trudy Claspill
Community Champion
April 6, 2022

Hello @Shah Baloch 

The filter you have created is trying to pull issues created in the past 15 days (compared to today) or in the 45 days that come after today.

Trying to filter for issues created between today and 45 days in the future doesn't make any sense. There are no issues to retrieve because they don't exist yet. All the filter can do is check against the created date of issues that currently exists.

Can you describe the problem you are trying to solve in more detail, with examples of issue creation dates and how you would expect resultant data set to change over time?

Shah Baloch
Contributor
April 6, 2022

Hi, @Trudy Claspill  Actually I'm trying to create two filters. One should pull issues that create in the last 15 days till today. The second filter should pull issues in the range of the last 45 days to the last 15 days.

For example: created date > 15days ago and created date <=45days ago
Here is a date example: start date 2/7/2022 and end date 3/23/2022

 

I am trying to pull the issues that were created between the last 15 days to the last 45 days. I don't want to add any specific date, instead of a variable that changes the range by itself.

Hope that makes sense.

Thank you

Trudy Claspill
Community Champion
April 6, 2022

Let us say you are trying to pull this report today - April 6, 2022.

You want the issues created as far back as 45 days ago, and as recently as 15 days ago. You don't want anything created more than 45 days ago, or more recently than 15 days ago. Is that correct?

If correct, then you would get the issues where

created date >= Feb. 20, 2022

created date =< March 23, 2022

In that case the filter you need is:

createdDate >= -45d and createdDate =< -15d
Like # people like this
Shah Baloch
Contributor
April 6, 2022

Thank you @Trudy Claspill I moved the second equal right side of the less than sign and it worked.

createdDate >= -45d AND createdDate <= -15d

Thank you so much

Like Dave Liao likes this

Suggest an answer

Log in or Sign up to answer