How to calculate total duration of a ticket in particular custom field.
Asked by Igal Altshuler:

Hi guys,

Can you please assist with how to add a customized field and filter column that will calculate the time from when the case was created to the resolved status?

Thanks,

Igal


Answers:
author: Kris Dewachter
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707) ,

You could create an automation rule that is triggered when the issue is resolved.

In the automation rule you can calculate the time between now, and the time the ticket was created. You can then store this result in a custom field.

![Screenshot 2024-01-22 at 11.36.27.png](https://community.atlassian.com/t5/image/serverpage/image-id/301726iA68BC1FA07F4712C/image-size/large?v=v2&px=999 "Screenshot 2024-01-22 at 11.36.27.png")

Best regards,

Kris

comments: author: Igal Altshuler
body: Thanks for the prompt response Kris!

Could you please specify also the rule structure?

Igal


author: Kris Dewachter
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707) ,

Create a "Number" custom field that you can use to store the calculated number of days.

You can set a trigger on a transition to the 'Resolved' state.

In the automation rule use the 'Edit Issue Fields' action to set this field by using this calculation :

{{issue.created.diff(now).days}}

![Screenshot 2024-01-22 at 15.18.38.png](https://community.atlassian.com/t5/image/serverpage/image-id/301778i86BF58DA76B84208/image-size/large?v=v2&px=999 "Screenshot 2024-01-22 at 15.18.38.png")

Best regards,

Kris


author: Igal Altshuler
body: Thank you very much!


author: Valeriia_Havrylenko_SaaSJet
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707) ?  

The time from when the case was created to the resolved status usually we called Lead Time.   
To get this you can try [Time in Status](https://marketplace.atlassian.com/apps/1219732?utm_source=Atlassian_Marketplace&utm_medium=referral&utm_campaign=Comment_How-to-calculate-total-duration-of-a-ticket-in-partic_20240509) add-on.   

To get total duration, all you need is to:

* create a status group;
* choose statuses;
* click the "Save" button.

![Frame 1021.png](https://community.atlassian.com/t5/image/serverpage/image-id/314190iA7F5A81E8DB763D6/image-size/large?v=v2&px=999 "Frame 1021.png")  

Another way can be [Time Between Statuses](https://marketplace.atlassian.com/apps/1221462/time-between-statuses?hosting=cloud&tab=overview&utm_source=Atlassian_Community&utm_medium=referral&utm_campaign=Comment_How-to-calculate-total-duration-of-a-ticket-in-partic_20240509) add-on that ?an calculate resolved time based on these calculations. It all depends on the timer configuration, which allows you to set up how and when the app should count the time spent on a task between different statuses.

![Frame 967.png](https://community.atlassian.com/t5/image/serverpage/image-id/314182i9E5031D1E1B0E84B/image-size/large?v=v2&px=999 "Frame 967.png")

Add-ons have 30-days trial version, free up to the 10 users and developed by my SaaSJet team.  

I hope this helps ?  

comments: author: Igal Altshuler
body: [@Valeriia_Havrylenko_SaaSJet](/t5/user/viewprofilepage/user-id/5162664)

Thank you very much - it was exactly what I was missing


author: Valeriia_Havrylenko_SaaSJet
body: [@Igal Altshuler](https://community.atlassian.com/t5/user/viewprofilepage/user-id/5167707) happy to hear!

I saw that you asked about average cycle time which you can get by**choosing average report** and filter the last 6 months by date ranges.   

Also you can [book a live demo](https://calendly.com/vitalii_meeting/time-in-status?utm_source=Atlassian_Marketplace&utm_medium=referral&utm_campaign=Button_more-info) - we'll show you the application inside out and answer all your questions.

if you find my answer useful, please accept it   

Thanks!


author: Amay Purohit_RVS
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707)

As an alternative, you can try out

[Time in Status Reports](https://marketplace.atlassian.com/apps/1226187/time-in-status-reports?hosting=cloud&tab=overview)

The app will easily help you extract time spent in each status of your issues.

The app allows you to group your statuses to define your own lead / cycle times. Also the Time between Status Transition report can help you track the time elapsed between 2 statuses. The app has 20+ reports to meet a variety of use cases. You can also add the app as a dashboard gadget.

Hope this helps.

[More details here](https://community.atlassian.com/t5/App-Central/Time-in-Status-Reports/ba-p/2348133)

The app is free for 10 users. Do try it out.

Disclaimer : I work for RVS, the vendor for this app

![TIS - Cycle Time report.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/323202i7AA8B79408770B43/image-size/large?v=v2&px=999 "TIS - Cycle Time report.PNG")


author: Gizem G?k?e _OBSS_
body: Update on May 9th, 2024: Time in Status by OBSS was recently rebranded as [Timepiece](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer). It is still the same capable app with the same dedicated team behind it. The answer below mentions the app as "[Time in Status](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer)" but you can find the app in the marketplace as "[Timepiece (formerly Time in Status)](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer)".

Hello [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707) ,

I understand that you want to calculate the resolution time of your Jira Issues. For that I can recommend [Time in Status](https://marketplace.atlassian.com/apps/1211756/) app which is built by my team at OBSS. It is available for both Jira Cloud, and Data Center.

Time in Status mainly allows you to see how much time each issue spent on each **status** or each **assignee** . You can combine the time for multiple statuses to get metrics like **Issue Age, Cycle Time, Lead Time, Resolution Time** etc. (Please see the screenshot below)

![Report Types DBS.png](https://community.atlassian.com/t5/image/serverpage/image-id/297567iB39A268E5668D298/image-size/large?v=v2&px=999 "Report Types DBS.png")

For all numeric report types, you can also calculate **averages** and **sums** of those durations grouped by the issue fields you select. For example total in-progress time per *customer*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](https://community.atlassian.com/t5/image/serverpage/image-id/287967iEB3E20D028A79EBE/image-dimensions/377x115?v=v2 "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](https://community.atlassian.com/t5/image/serverpage/image-id/287969i6023B2B027153EA1/image-dimensions/139x114?v=v2 "Gadget_AverageStatusDurationByComponent.png") ![tisCloud_IssueView_Data.png](https://community.atlassian.com/t5/image/serverpage/image-id/287970iC962B99E4941BEFA/image-dimensions/195x105?v=v2 "tisCloud_IssueView_Data.png") ![tisCloud_StatusDuration_LeadTime_Chart.png](https://community.atlassian.com/t5/image/serverpage/image-id/287968iD5CAFB7B04E07A84/image-dimensions/206x98?v=v2 "tisCloud_StatusDuration_LeadTime_Chart.png")

Visit [Time in Status](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview) to explore how our JIRA add-on can revolutionize your metrics measurement process. Enjoy **a 30-day free trial** to experience the full range of features.

Hope it helps,

Gizem

comments: author: Igal Altshuler
body: [@Gizem G?k?e _OBSS_](/t5/user/viewprofilepage/user-id/5319899) Thank you for your answer,

What would be the best option to create a report where I'll be able to get, for example, what is the highest, lowest, and average of a full cycle time from new to resolved status for opened cases for the last 6 months?

Thank you,

Igal


author: Gizem G?k?e _OBSS_
body: Hello [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707) ,

I've written an article in the Atlassian Community about [Revealing Operational Excellence: Identifying Bottlenecks through Metrics like Cycle Time, Lead Time](https://community.atlassian.com/t5/App-Central/Revealing-Operational-Excellence-Identifying-Bottlenecks-through/ba-p/2592758?utm_source=linkedin&utm_medium=unpaid-social&utm_campaign=P:online*O:community*I:social_share*)

In the second part of this article, I talked about how to create cycle time reports in our [Timepiece (formerly Time in Status)](https://marketplace.atlassian.com/apps/1211756/time-in-status?hosting=cloud&tab=overview&utm_source=community&utm_medium=answer) app. If you have time, I suggest you read this article and learn more about **Status Duration** and **Duration Between Statuses** reports, which are your options to get cycle time reports. This article will also tell you how to get the average cycle time result.

To find the lowest and highest results, I suggest you use the Sort feature of the application. If you sort the issues by their cycle time, you will be able to find the lowest and highest cycle time results.

Sometimes it is really hard to explain things by just writing them down, so if you would like to gather more information, you can [schedule a live demo](https://calendar.app.google/faQYgsEekRdFxnPj7) of our app. In this demo I can give you a comprehensive overview of the application, cover the cycle time reports and answer any questions you may have.

King Regards,

Gizem


author: Mehmet A _Bloompeak_
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707)

If you prefer to use a marketplace app, you can try [Status Time Reports](https://marketplace.atlassian.com/1221826) app developed by our team. It mainly provides reports and gadgets based on how much time passed in each status.

You can get issue resolution time by using**cycle time** (the time it takes for the team to start working on an issue and complete it) or **lead** **time** (the time interval between the moment an issue is requested to the moment it is completed) **report** . Here is the [online demo link](http://status-time.bloompeak.io/demo), you can see it in action and try without installing the app. For your case, you can have a look at [Lead Time for Each Issue](https://bloompeak.atlassian.net/plugins/servlet/ac/io.bloompeak.status-time/st-report?ac.reportid=904) and [Cycle Time for Each Issue](https://bloompeak.atlassian.net/plugins/servlet/ac/io.bloompeak.status-time/st-report?ac.reportid=901) reports.

For further details, you can have a look at [Cycle Time and Lead Time in Jira: Productivity Measurement with Two Critical Parameters](https://community.atlassian.com/t5/Marketplace-Apps-Integrations/Cycle-Time-and-Lead-Time-in-Jira-Productivity-Measurement-with/ba-p/1905845) article and [Status Time Reports How to Videos.](https://www.youtube.com/playlist?list=PLVHoaAkoFPJnG9nLkzcxG0P00ndQgimDs)

++App Features:++

* 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 completely **free** solution, you can try the limited version [Status Time Reports Free](https://marketplace.atlassian.com/apps/1222051).

Hope it helps.


author: Hannes Obweger - JXL for Jira
body: Hi [@Igal Altshuler](/t5/user/viewprofilepage/user-id/5167707)

I trust that you found an Automation-based solution!

Just for future reference, if you're open to solutions from the Atlassian Marketplace, this would also be easy to do using the app that my team and I are working on, [JXL for Jira](https://marketplace.atlassian.com/apps/1224710?hosting=cloud&tab=overview&utm_source=atlassian-community&utm_medium=referral&utm_content=2585201).

JXL is a full-fledged spreadsheet/table view for your issues that allows viewing, inline-editing, sorting, and filtering by all your issue fields, much like you'd do in e.g. Excel or Google Sheets. It also comes with a number of so-called *smart columns* that aren't natively available, including the *time between created and resolved*.

This is how it looks in action:

![time-between-created-and-resolved.gif](https://community.atlassian.com/t5/image/serverpage/image-id/301951iE26E135FC3B750BA/image-size/large?v=v2&px=999 "time-between-created-and-resolved.gif")

As you can see above, you can easily sort and filter by the time between created and resolved, and also use it across JXL's advanced features, such as support for (configurable) *issue hierarchies* , *issue grouping* by any issue field(s), *sum-ups* , or *conditional formatting*.

This all *just works*, so there's no scripting or automation whatsoever required.

Any questions just let me know,

Best,

Hannes


Tags: cloud

jira-service-management

jira-service-management-cloud