Filter closed tickets by date/period

Kseniia September 9, 2021

Could you please help me with JQL syntax to find closed tickets per certain period of date?

I tried:

  • resolved >= 2021-09-01 AND resolved <= 2021-09-09 AND project = CB ORDER BY created DESC
  • closed >= 2021-09-01 AND closed <= 2021-09-09 AND project = CB ORDER BY created DESC
  • done >= 2021-09-01 AND done <= 2021-09-09 AND project = CB ORDER BY created DESC
  • resolutiondate >= -7d
  • resolved >= -7d
  • status changed to Closed after -30d
  • resolutiondate >= -1w AND project = CB

Thank you in advance for the help.

4 answers

3 votes
Charalampos Dimitriadis June 1, 2023

You can handle the "Close" like the example below:

status changed to Closed after 2021-08-31 AND status changed to Closed before 2021-09-10

Source: @Willy Wijaya   https://community.atlassian.com/t5/Jira-questions/JQL-for-closed-date-vs-created-date/qaq-p/595575

2 votes
Dennis Christilaw December 12, 2022

This is what worked for me, edit as needed:


project = {{PORJECT_ID}} AND issuetype = "{{ISSUE_TYPE}}" AND status in (Closed, Rejected, "Rolled Back") AND status changed BEFORE 30d


This is showing me the tickets that have been closed in the last 30 days.

Dennis Christilaw February 10, 2023

Found an issue with the JQL I posted above, this one, however, does work!!


project = {{PROJECT_ID}} AND issuetype = {{ISSUE_TYPE}} AND status in (Closed, Rejected, "Rolled Back") AND updated >= startOfDay(-30d)


Edit as needed.

Sorry about that, it took me a while (and turning my brain back on) to see that the old query is was borked.

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 9, 2021

So in the first three, you are using date comparisons correctly in theory at least.

Taking just one of the clauses as an example to explain:

closed <= 2021-09-09

in human speak says "the date held in the field called closed is less than or equal to 9th September 2021".  That's a perfectly good question (and to clarify "is less than", that comes out as "before" when talking about dates, because behind the scenes the dates are actually "number of seconds elapsed since 1st Jan 1970", so the larger the number, the later the date)

However, "closed" is not a field in Jira, unless you've added a custom field for it.  I guess that you mean "date/time that an issue transitioned from a status into another that we consider closed", and it's not unusual to see people add custom fields to do this and then have a post-function set the data to "now" when the issue is closed.

But I suspect you've not done that yet!

On the other four, those will work as you expect, so I'm a bit stuck on what you need help with!

0 votes
Logan Mulderrig April 22, 2024

status changed to ("UAT COMPLETE", "ARCHIVED", "DONE", "CLOSED") AFTER "2023-12-29" BEFORE "2024-01-23"

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events