How to Retrieve Duration of JIRA Issue in a Specific Status

How can I obtain the time a JIRA ticket stayed in ‘Ready For Test’ after leaving ‘In Progress’? I need a JQL query that supports Excel export.

In my experience, native JIRA doesn’t offer a straightforward way to extract time differences directly with JQL. I ran into a similar issue and ended up using a plugin called ‘Time in Status,’ which logs detailed transition data and makes Excel export much simpler. Once the plugin is in place, you can pinpoint the exact moment an issue left ‘In Progress’ and entered ‘Ready For Test,’ then calculate the duration accordingly. Although it involves additional setup, it saves time and reduces manual error compared to processing raw changelog data.

I discovered that although JIRA’s native features are quite restrictive for this type of analysis, an effective workaround is to use the Jira REST API to access the full issue history including status transitions. By extracting the changelog data and processing it externally—such as with a small custom script—you can precisely calculate the time between status changes and then export this data to Excel. This method, while it requires extra technical effort, offers a level of control and accuracy that native capabilities simply cannot match.

i ended up sticking with a custom groovy script that scrapes the changelog, calculates the time diff and outputs csv files for excel import. it worked decently for our setup despite a few quirks with timestamp formats.

I have found success by leveraging JIRA’s built-in automation capabilities rather than relying solely on external tools. In my case, setting up automation rules to record entry and exit times for each status helped me bypass the need for a custom script or plugin when preparing data for Excel export. Once the rule captured the timestamps into custom fields, I calculated the time difference for ‘Ready For Test’ on a separate workflow transition. This method proved effective in maintaining control over data and simplifying the overall process.

An alternative method that has served me well involves using Scriptrunner for JIRA, which offers custom calculated fields. I set up a scripted field to automatically compute the time an issue spends in ‘Ready For Test’ by looking at the recorded timestamps during status transitions. This method eliminates the need for manual data handling and external scripts, providing instant metrics within JIRA. Although it requires some initial scripting effort, the result is a dynamic, real-time solution that simplifies the process of extracting and analyzing duration data in a format ready for export.