Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to write a query to show the time a ticket was in a specific status

Jim Henry
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 24, 2023

Is there a query that will show me how long a ticket spent in a status?

Example: How long a ticket had at the status of testing.

I am trying to create an (organization) metric that shows the average time all tickets were in a specific status for a particular of time.

Thanks

4 answers

1 vote
Valeriia_Havrylenko_SaaSJet
Atlassian Partner
April 25, 2023

Hello @Jim Henry 

As an alternative, I can suggest you to try our add-on 
time-in-status-for-jira-cloud .

You can add a column that will show you time spend to complete the task. And also you will be able to generates 7 types of reports. So you can monitor the work duration in each status easily. 

GIF TIS.gif

Also, you can export a report as XLSX or CSV files for further analysis.

Hope my answer will be helpful for you

Best regards, Valeriia

0 votes
Emre Toptancı _OBSS_
Atlassian Partner
April 25, 2023

Hello @Jim Henry 

Jira does not provide this as an out-of-the-box report. JQL queries can be used to filter issues but JQL can't perform calculations on issues or issue histories.

The closest out-of-the-box feature you can get is a Control Chart. If you have Jira software, you can define a Kanban board with each status as a separate column on the board and use the Control Chart of the Kanban board to get a high-level visual report about this.

Jira's Control Chart offers limited details and limited flexibility in terms of report parameters. To get max details and more flexibility, you'll need to use a marketplace app.

 

If you are OK with using a marketplace app for this, our team at OBSS built Timepiece - Time in Status for Jira for this exact need. It is available for Jira Server, Cloud, and Data Center.  

Time in Status mainly allows you to see how much time each issue spent on each status or each assignee

tisCloud_StatusDuration_LeadTime_with Estimates.png    tisCloud_AssigneeDuration.png

The app has Consolidated Columns feature. This feature allows you to combine the duration for multiple statuses into a single column and exclude unwanted ones. It is the most flexible way to get any measurement you might want. Measurements like Issue Age, Cycle Time, Lead Time, Resolution Time etc. 

For all numeric report types, you can calculate averages and sums of those durations grouped by the issue fields you select. For example total in-progress time per Vertical or average resolution time per sprint, week, month, issuetype, request type, etc. The ability to group by parts of dates (year, month, week, day, hour) or sprints is particularly useful here since it allows you to compare different time periods or see the trend. 

tisCloud_StatusDuration_LeadTime_Average_TimeGrouped.png

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. It supports both Company Managed and Team Managed projects for Jira Cloud.

Time in Status reports can be accessed through its own reporting page, dashboard gadgets, and issue view screen tabs. All these options can provide both calculated data tables and charts.

Gadget_AverageStatusDurationByComponent.png  tisCloud_StatusDuration_LeadTime_Chart.png

Timepiece - Time in Status for Jira

EmreT

0 votes
Mehmet A _Bloompeak_
Atlassian Partner
April 25, 2023

Hi @Jim Henry

You can try Status Time Reports app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.

Here is the online demo link, you can see it in action and try without installing the app.

  • This app has a dynamic status grouping feature so that you can generate various valuable reports as time in status, time in assignee, status entry dates and status counts, cycle time and lead time, average/sum reports by any field(e.g. average in progress time by project, average cycle time by issue creation month).
  • You can search issues by Project, Issue Type, Status, Assignee, Issue Creation/Resolution Date(and any other Date field) and JQL Query.
  • Status durations are calculated according to the working calendar you define. 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.
  • You can set different duration formats.
  • You can export reports in CSV file format and open them in MS Excel.
  • You can also add this app as a gadget to your Jira dashboards and reach “Status Time” from Issue Detail page.
  • You can enable/disable access to Status Time reports&gadgets and Issue Detail page per project, users, groups or project role.

If you are looking for a free solution, you can try the limited version Status Time Free.

Hope it helps.

0 votes
Himanshi
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 24, 2023

Hello @Jim Henry , 

Welcome to the Community!

You can configure the automation rule based on the trigger "Issue transitioned"

create a custom field of type "data and time picker" and store the difference in time with the help of {{now.diff(issue.created).weeks}} smart value . You can try to explore more smart value based on your requirement from :https://support.atlassian.com/cloud-automation/docs/jira-smart-values-date-and-time/

There are some more discussion about the similar use case in https://community.atlassian.com/t5/Jira-Core-Server-questions/Jira-Automation-rule-adjusting-for-time-tracking/qaq-p/1566189 Please feel free to refer it. 

If you wish to use an add-on please feel free to check them in the above community post.

Have a great day !

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events