Searching for Jira tickets with status change history
I’m trying to figure out how to search for Jira tickets that entered a particular status (let’s say ‘Ready for Testing’ or RTT) after a specific date. The tricky part is that these tickets might not be in that status anymore. They could be resolved or in any other status now.
What I’m looking for is a JQL query that can:
- Look at the status change history of tickets
- Find all tickets that entered ‘RTT’ status after, say, January 1, 2023
- Include these tickets in the results regardless of their current status
Is there a way to do this with JQL? I’ve tried a few things but can’t seem to get it right. Any help would be much appreciated!
I’ve dealt with this exact issue before, and I can tell you it’s a bit tricky. The JQL queries suggested so far are good, but they might miss some edge cases. Here’s what I’ve found to be the most reliable approach:
status changed to ‘Ready for Testing’ after ‘2023-01-01’ OR (status was ‘Ready for Testing’ DURING (‘2023-01-01’, now()) AND status changed after ‘2023-01-01’)
This query catches both tickets that directly changed to RTT after your date, and those that were in RTT at some point after that date but might have entered it before. It’s a bit more comprehensive.
One caveat: if you have a large number of issues, this query might be slow. In that case, you might need to break it down into smaller date ranges or consult with your Jira admin about optimization.
Also, don’t forget to double-check the exact status name in your Jira instance. Sometimes they can be slightly different from what you expect.
hey TomDream42, i think i got a solution for ya. try this JQL:
status changed to ‘Ready for Testing’ after ‘2023-01-01’
it’ll show all tickets that hit RTT after jan 1, no matter where they are now. lemme know if it works for ya!
I’ve encountered a similar situation before, and there’s a solution using JQL. You can use the ‘WAS’ function combined with the ‘DURING’ clause to achieve this. Here’s a query that should work:
status WAS ‘Ready for Testing’ DURING (2023-01-01, now())
This query will find all issues that were in the ‘Ready for Testing’ status at any point from January 1, 2023, up to now, regardless of their current status. You can adjust the date range as needed.
If you want to refine it further, you can add more conditions. For example, to exclude issues that were in RTT before your start date:
status WAS ‘Ready for Testing’ DURING (2023-01-01, now()) AND NOT (status WAS ‘Ready for Testing’ BEFORE ‘2023-01-01’)
Hope this helps solve your problem!