Parse Time in Status JQL

Sérgio Hilgert Junior
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!
December 9, 2020

Hi, I'm trying to get the cycle time from my tasks via JQL (Using Jira Cloud for Sheets to send data to Google sheets), and the only way I can get the cycle time is when I use the "Time in Status" field, but it returns this:

3_*:*_1_*:*_2041_*|*_10024_*:*_1_*:*_0_*|*_10023_*:*_1_*:*_15317_*|*_10025_*:*_1_*:*_2726_*|*_10028_*:*_1_*:*_2671

Does anyone knows how can I parse it? I was looking for something like:

To do: 2

In Progress: 10

Code Review: 4

Or maybe does anyone knows another way to get issues cycletime via Jira Cloud for Sheets?

 

4 answers

1 accepted

1 vote
Answer accepted
Sérgio Hilgert Junior
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!
December 11, 2020

Hi thanks for the answers but I was trying to do this without a plugin.

I've found the solution, if someone else is trying to do this too:

 

This represents a status:

<STATUS_ID>_*:*_<NUMBER_OF_TIMES_ISSUE_WAS_IN_THIS_STATUS>_*:*_<SECONDS>_*|

David Leal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 26, 2021

@Sérgio Hilgert Junior I am trying to use the same for getting the number of times the story was on a diven status. Did you find a way to parse the regular expression using Google Sheet? For example, using REGEXEXTRACT.

For example in my instance I have the following:

10060_*:*_1_*:*_1121033406_*|*_3_*:*_1_*:*_7409_*|*_10000_*:*_1_*:*_270003163_*|*_10088_*:*_1_*:*_2595005_*|*_10087_*:*_1_*:*_1126144_*|*_10001_*:*_1_*:*_0

I found out that the Status ID for IN PROGRESS is 3, which is a very common number to find in the rest of the string. Thanks.

Like Mark Collins likes this
David Leal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 28, 2021

I posted a question in Stackoverflow for parsing this information and I got a response. Here is the post:

https://stackoverflow.com/questions/68146518/parse-days-in-status-field-from-jira-cloud-for-sheets/68146721#68146721

David Leal
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 8, 2021

@Sérgio Hilgert Junior I verified that the time in status is not in SECONDS, instead MILI SECONDS.

3 votes
Mariana_Pryshliak_Saasjet
Atlassian Partner
December 10, 2020

Hello @Sérgio Hilgert Junior 

You can try Time in Status for Jira Cloud and Time Between Statuses.

Time in Status for Jira Cloud lets you get Cycle and Lead time by setting Status Groups. You can configure it from your account at the Column Manager with the drop-down list of the statuses. A custom report can be placed on the main Jira dashboard with the special Gadget tool, and you can export data in XLSX or CSV formats.

tis_cycletime.gif

Time between Statuses is the add-on, which measures connections in the workflow, through a transition time in specific issues. You can count Cycle and Lead Time by setting start/stop and pause statuses in the configuration manager. To detail the calculation conditions you should select the first/last transition to/from status.

You can customize your Cycle and Lead Time reports by adjusting the app interface fields such as: Type of Project Date range Time Format Multi Calendar (to configure non-working hours and different calendars.) This add-on also allows you to export data in XLSX or CSV formats.

tbscycletime.gif

Hope it helps

Best regards, Mariana

1 vote
Mehmet A _Bloompeak_
Atlassian Partner
December 10, 2020

Hi @Sérgio Hilgert Junior ,

I suggest that you use the REST API to get the issue history and via coding parse the coming json response to extract the data you need for each issue.

Alternatively, you can try marketplace apps which does the above for your. We developed Status Time app for this exact need. There is also free but limited version of it, Status Time free.

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.

Screen Shot 2020-12-10 at 15.42.30.png

0 votes
Emre Toptancı _OBSS_
Atlassian Partner
December 10, 2020

Hello @Sérgio Hilgert Junior ,

I am afraid status duration data is a custom calculated data and needs a little more processing than simply transferring field value to sheets.

The raw data you search for is available in each issue's history. You can see it in the History tab of each issue's view screen. But Jira does not give it as a ready calculated data set.

You can try getting the data via REST API and doing your calculations, if you are comfortable with developing code. 

 

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). 

tisCloud_StatusDuration_Report.png  tisCloud_IssueView_Chart_StackedColumn.png  tisCloud_MainPage_Chart_Pie_ExcludeMarked.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.

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:

  • 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 issuetype.)
  • 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 (released for cloud, server&DC gadget coming soon)

https://marketplace.atlassian.com/1211756

EmreT

Suggest an answer

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

Atlassian Community Events