I’m trying to figure out how to search for Jira issues that were resolved soon after they were created. For instance, I want to find all tickets that were closed within a week of being opened.
Here’s what I’m thinking:
resolution_date - creation_date <= 7d
But I’m not sure if that’s the right syntax. Let me give you an example of what I mean:
- Issue A: Created Monday, resolved Tuesday
- Issue B: Created Monday, resolved Friday
- Issue C: Created Monday, resolved next Monday
I want my search to return Issues A and B, but not C. Basically, I need to find issues that were created on day X and resolved on or before day X+7.
Does anyone know how to set up this kind of search in Jira? I’d really appreciate any help or tips!
hey, try this JQL:
created >= -30d AND resolved <= 7d
it’ll show tickets made in last month and fixed within a week. tweak the numbers if ya need. works great for me, hope it helps u too!
I’ve dealt with this exact scenario before, and I can share what worked for me. Instead of using the JQL you proposed, try this:
resolved >= startOfDay(-7d) AND created >= startOfDay(-7d) AND resolution IS NOT EMPTY
This query will find issues created and resolved within the last 7 days. It’s more flexible than subtracting dates, which can be tricky in JQL.
If you need a specific date range, you can replace ‘-7d’ with your desired start date:
resolved >= ‘2023-01-01’ AND created >= ‘2023-01-01’ AND resolution IS NOT EMPTY
This approach has consistently given me accurate results. Just remember to adjust the date range as needed for your specific use case.
Hope this helps solve your problem!
Having worked extensively with Jira, I can offer an alternative approach that might suit your needs better. Consider using the ‘resolutiondate’ field in combination with the ‘created’ field. Here’s a JQL query that should work:
created >= startOfDay(-30d) AND resolutiondate <= created + 7d AND resolution IS NOT EMPTY
This query looks for issues created in the last 30 days (adjust as needed) and resolved within 7 days of creation. It’s more precise than relying solely on the last 7 days, as it captures older issues that were quickly resolved.
You can further refine this by adding project or issue type filters if necessary. Remember to test the query with a smaller date range first to ensure it’s returning the expected results.