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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

JQL returns a count of issues, even though the date range is in the future (should be 0)


I am not clear why this returns a count, when it's future one would presume it returns 0

"Dev Team" = "My Team"AND status was in ("To Do") on "2021-04-09 00:01" AND status was in ("To Do") on "2021-04-09 23:59"

Assuming today is the 8th. The result is what was there in the day prior. This does not make sense to me.


Hi @dave 

Just a guess: are you using any Next-Gen projects in your instance?  If so, the status model seems have to "altered" the behavior, making WAS unreliable.  Here are the defects for this:

Of note: this broke add-ons we had purchased also, as they depended upon status searches behind the scenes.

At this time, the only work-around seems to be to find the exact status id value and use that in your searches.  Even the REST API responses appear to have been impacted.

Best regards,


Thanks, @Bill Sheboy  No, we're using classic. But, I have heard about using a status ID ( a long long time ago) to resolve issues. I'll give it a try, but have a gut feeling that's not gonna solve the issue.

So running this query (10216 is To Do status)

"Dev Team" = MyTeam AND status was in (10216) on "2021-04-14 00:01" AND status was in (10216) on "2021-04-14 23:59"

and still showing an issue count, 38 Issues, for tomorrow. Wrong!

Have you tried the ON with just date?  I am wondering if it is having a problem with the exact date time.  Maybe something like:

"Dev Team" = MyTeam AND status WAS 10216 ON "2021-04-14"

Just tried that

"Dev Team" = My Team AND status was in (10216) on "2021-04-14"

Still returns the count from the previous day.

Hi @dave 

Would you please describe the problem you are trying to solve?  Why would you need a query to test for future history (that hasn't happened yet) just to get a zero record count?



So that I can create the chart today, and not have to come back everyday to update.

Thanks, Dave.  I suspect you may stuck if you are trying to stay inside of out-of-the-box Jira to do this, as @Josh_Kochelek__Modus_Create notes about JQL interpreting the query to max-out on the current date for history changes.  (JQL isn't a SQL...)

If you are doing this query to chart in one of the plug-ins for Excel or GoogleSheets, perhaps you could add additional logic to make your chart correct, even though the returned data is a superset of what you want.

Other options are to:

  • investigate reporting/dashboard gadget addons from the marketplace which display exactly what you want, regardless of JQL interpretation of history
  • pull the history data using the REST API into another reporting tool

@dave - When using JQL historical operators (i.e. 'was') you are actually searching the history of changes in the issue. So, if you enter future dates into a query using the was operator, this is the exact same as querying what the value is currently. 

For example: 

If today is 4/14/21, consider the following queries:

Status WAS "To Do" DURING ("2021/05/01", "2021/05/01")
Status WAS "To Do" AFTER "2021/04/14"

These queries and similar queries (assuming the query is being run before the date in question) will return the exact same results as the following query 

Status = "To Do"

That being said, after the date in the query has passed, running the same query will give you the expected results, based on which issues historical values match the provided date or time frame. 

Please let me know if that makes sense or if I can clarify. 

Like # people like this

Thanks @Josh_Kochelek__Modus_Create , yes that makes perfect sense.


So how do I write/run the query where it will return 0 (my expectation)?

Mohamed Adel Community Leader Apr 16, 2021


May I ask if this issue works only when you add the next day as created in your query or it appears with any future date (let's say next week)? 

Thanks, @Mohamed Adel . Yes, for any future date if pulls that last "valid" date count of issues.


Log in or Sign up to comment