Hi @zoulei_cn_ibm_com , Welcome to the community!
Unfortunately it is not possible out-of-the-box in Jira. JQL does not have capability to compute time spent between statuses. However, the data you need is implicitly available in issue history. You can get issue history via Jira rest api and then you need parse the json response(similar to the below), calculate the time difference for each issue.
Or, you can try marketplace apps. We built Status Time app for this exact need. It provides reports on how much time spent in each status as well as status entry dates and status transition count. It also has CSV export feature.
Once you enter your working calendar into the app, it takes your working schedule into account too. That is, "In Progress" time of an issue opened on Friday at 5 PM and closed on Monday at 9 AM, will be a few hours rather than 3 days. It has various other reports like assignee time, status entry dates, average/sum reports(eg. average in progress time per project).
Here is the online demo link, you can see it in action and try. Hope it helps.
One of the below cases might be the reason.
Time between Statuses (server version) becomes helpful in this case. This add-on calculates how long it takes an issue to move from one status to another.
Also, exporting is available. You can download data as XLSX or CSV file and analyze it using Google Spreadsheets, Microsoft Excel etc. So you can export the start time, open time, close time of a story, or task easily!
I hope it helps.
Best regards, Mariana.
You can measure the time spent in a task or a story with Enhancer Plugin for Jira.
Enhancer Plugin for Jira has Time between custom field that measures time spent between two statuses /events. You can configure it to measure time spent between Created and Resolved events which will how you the elapsed time for each issue.
Enhancer Plugin for Jira also has Stateoscope tab displays all issue status and assignee changes at a glance, within a handy tab view. Each row displays an action which consists of the transition date, owner, before and after assignee/status, and total duration within the status or assignee. This will help you to analyze the start (created) and close (Resolved) dates of each issue. However, Jira has these fields already and you can add them in the issue navigator as columns to extract reports.
Please let me know if you have further questions.
Please note that I'm one of the members in the Snapbytes team.
Hello @zoulei_cn_ibm_com ,
Jira does not provide this as a ready-to-go report. You either have to calculate this yourself (by getting the raw data from REST API or DB tables) or use a marketplace app for this.
For a ready built solution that offers great flexibility and details, our team at OBSS built Time in Status app for this exact need. It is available for Jira Server, Cloud and Data Center.
Time in Status allows you to see how much time each issue spent on each status or assigned to each assignee as well as entry/exit dates for all statuses. You can also combine statuses into consolidated columns to see metrics like Ticket Age, Cycle Time or Lead Time. You can calculate averages and sums of those durations and counts grouped by issue fields you select. (For example see the total InProgress time per Epic, or average number of InProgress transitions per issuetype).
The app calculates its reports using already existing Jira issue histories so when you install the app, you don't need to add anything to your issue workflows and you can get reports on your past issues as well.
The app has Custom calendar support which means you can get your reports based on a 24/7 calendar or your custom business calendar. (This one is important because a 24/7 calendar in most cases shows misleading data. For example an issue created at 16:00 on Friday and was resolved at 09:00 on next Monday seems to stay open for 2,5 days but in terms of business hours, it is only a few hours. You can see this using Time in Status by OBSS.)
Finally, the app has History Trim feature. This feature allows you to report on a subsection of issue histories instead of the whole history. Very useful when you want to focus on changes made during sprint or project phase.
Using Time in Status you can:
I have multiple projects that use variations of the same base workflow. The variations depend on the requirements of the project or issue type. The variations mostly come in the form of new statuses ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events