How to search for Jira issues modified within a specific date range?

Hey everyone,

I’m struggling to find the right JQL query to get Jira tickets that were worked on between two dates. I want to see all the issues that had any updates within that timeframe.

I tried this query:

project = MyProject and updated > '2024-01-10' and updated < '2024-02-10'

But it’s not giving me all the results I expected. It seems to be leaving out tickets that were updated multiple times, including after the end date.

Does anyone know a better way to write this query? I want to make sure I catch all the issues that had any activity during that month-long period, even if they were also updated later.

Thanks for any help you can offer!

I’ve found that using a combination of the ‘was’ and ‘during’ functions in JQL can provide more comprehensive results for your specific query. Here’s an approach that has worked well for me:

project = MyProject AND status WAS NOT EMPTY DURING (‘2024-01-10’, ‘2024-02-10’)

This query captures all issues that had any status change within the specified date range, which effectively covers all updates. It’s particularly useful for catching issues that might have been updated multiple times, including outside your target period.

For even more precise results, you could also consider adding a check for resolution date:

project = MyProject AND (status WAS NOT EMPTY DURING (‘2024-01-10’, ‘2024-02-10’) OR resolutiondate >= ‘2024-01-10’ AND resolutiondate <= ‘2024-02-10’)

This addition ensures you don’t miss any issues that were resolved within your timeframe but might not have had a status change.

hey mate, i’ve got a trick for ya. try this:

project = MyProject AND (updatedDate >= startOfDay(‘2024-01-10’) AND updatedDate <= endOfDay(‘2024-02-10’))

this catches everything touched in that timeframe, even if it was messed with later. the startOfDay and endOfDay functions make sure you don’t miss anything on those dates. lemme know if it works for ya!

I’ve dealt with this exact issue before, and I can share what worked for me. Instead of using the ‘updated’ field, which can be tricky for the reasons you’ve encountered, try using the ‘updatedDate’ function. Here’s a query that should give you more accurate results:

project = MyProject AND updatedDate >= '2024-01-10' AND updatedDate <= '2024-02-10'

This approach captures all issues that had any updates within your specified date range, regardless of subsequent modifications. It’s been a game-changer for my reporting needs.

Also, if you want to be extra thorough, you might consider including the ‘OR’ operator to catch issues created during that period:

project = MyProject AND (updatedDate >= '2024-01-10' AND updatedDate <= '2024-02-10' OR created >= '2024-01-10' AND created <= '2024-02-10')

This ensures you don’t miss any new tickets that might not have been updated after creation. Hope this helps solve your problem!