Information about Time in Status field used in the Average Time in Status gadget

Hey guys,

We're interested in using the field Time in Status (provided by the JIRA Charting Plugin|https://marketplace.atlassian.com/plugins/com.atlassian.jira.ext.charting ) in our reports.

If you make the field available for a project, you can use the Average Time in Status gadget to see how long an issue was in a certain status.

Although, if you make a search and export the result in a xls format, the fiel content is something like

10056_:6:70395842* 10055:6:114204688 10049:1:15219341 6:1:0 10043:5:147729951 5:1:55096 10046:1:23653 10045:3:417853168 10041:6:125842634 10189:1:15119908 10042:1:*_34525942

I believe this is a code that is interpreted by the gadget, and probably has the info about status id and time in that status...

Would you know the logic behind this bizar number? This would solve a big issue for us. Really big.

I'm sure there is a developer out there that knows it.

5 answers

1 accepted

This widget could not be displayed.

Hey Luzia,

Just sharing the information from our support ticket with the communite. This is what we found out (thanks to Andreas Knecht):

The source coide of JIRA Charting Plugin is available here, in particular here's the code that formats the custom field value.

Basically it works like this:

  • The field stores all statuses an issue's ever been in.
  • They are separated by {{\_\*\|\*\_}}.
  • For each status we store the status id, number of times in status and time in seconds in that status
  • Those fields are separated by {{\_\*:\*\_}}


So for example the string:

1_*:*_1_*:*_428390000_*|*_6_*:*_2_*:*_3099699000_*|*_5_*:*_1_*:*_345594000

Means the following:

  • We were in status with id 1, 1 times for 428390000 seconds
  • We were in status with id 6, 2 times for 3099699000 seconds
  • We were in status with id 5, 1 times for 345594000 seconds


So this is the format:

<statusID>_*:*_<noOfTimesInStatus>_*:*_<secondsInStatus>_*|*_<statusID2>_*:*_<noOfTimesInStatus2>_*:*_<secondsInStatus2>

Cheers

Thanks for the very useful information. The only thing I would add is that I think it's milliseconds not seconds (I compared the field value versus JIRA front-end)

This widget could not be displayed.

hi, I have the 'Average Time in Status' working to an extent but I am confused by the way the data is grouped on the chart. I was expecting it to be based on the resolution date but if I right click on a data point on a given date , the group of issues displayed has different resolution dates but all have the same updated date. This implies that the data is being grouped not by resolution date (i.e. when the defect was fixed) , but when any update was made to the defect. Please can this be clarified?

+1 updated >= "2014-12-05 09:00" AND updated <= "2014-12-05 09:59" This JQL is executed for HOURLY option in the Gadget. But what if you attach a file to an issue resolved in this ambit? Then the issue disappears from the filter. The info based on such JQL requests can be inconsistent.

Is there any update at this issue. Can the JQL be modify to match resolution date?, even create date is fine, but I don't think the update date is very helpfull. PLease let me know if there is a way to make this work. Thanks

This widget could not be displayed.

This is great information. Thanks.

Related question: The "Time in Status" custom field is not available as a column option in the issue navigator for export. I added it as a custom field with a global context. To be safe, I also restricted my search to only closed items in a specific project and issue type.

What else do I need to do to make this column appear?

This widget could not be displayed.

Hi Luzia! Thanks so much for your question, I am actually facing a similar problem, but I am one step behind you...how were you able to capture the value stored in the "Time in Staus" variable. You mention

if you make a search and export the result in a xls format, the fiel content is something like

10056_:6:70395842* 10055:6:114204688 10049:1:15219341 6:1:0 10043:5:147729951 5:1:55096 10046:1:23653 10045:3:417853168 10041:6:125842634 10189:1:15119908 10042:1:*_34525942

When I run a JQL search for issues where time in status is not null and then export, the value of the custom field is empty, see below

<customfield id="customfield_13262" key="com.atlassian.jira.ext.charting:timeinstatus">
<customfieldname>Time in Status</customfieldname>
<customfieldvalues></customfieldvalues>
</customfield>
The field is available for ALL projects and I have re-indexed projects since the custom variable was created. Can you walk me through how you were able to get the output you specified? I have succesfully been able to grab this information with the REST API, but not through the the search naviagtor.
This widget could not be displayed.

Thanks everyone for this great discussion!

I have also faced similar issue while trying to retrieve 'Time in Status' value: my Gadget is up and running, but when I perform an .xls export  for all the issues (or just for the ones which have been already resolved) for a given project, I do not see such a field's data in it.

Please let me know whether it can be retrieved only via REST API?

 

Thanks in advance,

Nadiya

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published 7 hours ago in Bitbucket

Branch Management with Bitbucket

As a project manager, I have discovered that different developers want to bring their previous branching method with them when they join the team. Some developers are used to performing individual wo...

36 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you