Forums

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

Get time between statuses using API?

Luke October 25, 2021

Hi all,

I'm attempting to gather a timestamp of when an issue transitions between statuses. Is it possible to pull this kind of data through the API on Jira Server?

I've read parts of this: https://docs.atlassian.com/software/jira/docs/api/REST/8.5.3/#api/2/
but I'm not sure if I'm using the right function:

/rest/api/2/issue/"IssueKey"?changelog

Even if this is the result that I am looking for, is there an easy way to parse a result like this in Excel or another tool to get what I am looking for?

Let me know,

Thanks!

-Luke

4 answers

2 votes
Zoryana Bohutska _SaaSJet_
Atlassian Partner
October 25, 2021

Hi @Luke 

You can look at another option like the app Time Between Statuses from Atlassian Marketplace.

Using it you can set start/pause/stop statuses for time calculation and get the data you need. 

 

Hope it will help

This app is developed by my team, so let me know if you have any questions.

 

Regards

0 votes
Rahul_RVS
Atlassian Partner
November 2, 2021

Hi @Luke 

If you would be interested in an add-on to view this report, you can try out our app

Agile Tools - Epic Tree, Links Tree and Time in Status 

It provides the status transitions reports. Also the add-on provides the time in each status for the entire lifecycle of the issue and you can filter by issue type as well. You can also combine your statuses to define your lead/cycle/resolution time and also extract the transitions history of the issues.

 

 

Time in Status.png

0 votes
Emre Toptancı _OBSS_
Atlassian Partner
November 1, 2021 edited

Hello @Luke

Our team at OBSS built Timepiece - Time in Status for Jira for this exact need and more. 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 and each assignee. 

tisCloud_StatusDuration_LeadTime_with Estimates.png tisCloud_AssigneeDuration.png         

You can calculate averages and sums of those durations grouped by the issue fields you select. For example total in progress time per customer (organization) or average resolution time per week, month, issuetype etc.

tisCloud_StatusDuration_LeadTime_Average_TimeGrouped.png

It also has date reports showing transition dates to/from each status.

tisCloud_FirstTransitionToStatusDate_Report.png

And the app has a REST API so you can get the reports from Jira UI or via REST.

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.

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

Using Time in Status you can:

  • See how much time each issue spent on each status, assignee, user group and also see dates of status transitions.
  • Calculate averages and sums of those durations grouped by issue fields you select. (For example, see average InProgress time per project and per issue type.)
  • Export your data as XLS, XLSX, or CSV.
  • Access data via REST API. (for integrations)
  • Visualize data with various chart types.
  • See Time in Status reports on Jira Dashboard gadgets

Timepiece - Time in Status for Jira

EmreT

0 votes
Mehmet A _Bloompeak_
Atlassian Partner
October 27, 2021

Hi @Luke ,

Yes, this the correct and only rest api that you can use. The data you need is available in issue history and you can get it using rest api. It provides the exact status changes for each issue. It returns json, then you need to calculate it by coding which parses issue history rest api json for each issue.

Mehmet A _Bloompeak_
Atlassian Partner
October 29, 2021 edited

Hi @Luke ,

If you are looking for a tool, you can try Status Time app developed by our team.It provides reports on how much time passed in each status. By grouping statuses you can get cycle time(E.g from in progress status to done status). You can also export the report as CSV and open it in excel.

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 by any field(e.g. average in progress time by project, average cycle time by issue creation month). And all these are available as gadgets on the dashboard too.

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

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

Suggest an answer

Log in or Sign up to answer