Forums

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

How to get (through the Jira REST API) how long an issue was blocked?

Marcelo Fernandes
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!
May 23, 2019

My Jira installation has a field that should collect information on how long an issue stayed flagged.

The custom field that supposedly should store this information should have the following format:

x1_*:*_y1_*:*_z1_*|*_x2_*:*_y2_*:*_z2

where :

  • x1, x2, etc. is the status if where the issue was flagged;
  • y1, y2, etc. is the number of times the issue was flagged in that status; and
  • z1, z2, etc. should be the sum of how long the issue was flagged in that status,

For example:

1_*:*_1_*:*_60697854_*|*_6_*:*_1_*:*_0

 

Well, I have seen in a couple of other questions here in the Atlassian Community people saying the z fields were calculated in milliseconds.

However, I the "z" values are neither getting measured in milliseconds nor in seconds.

In the example above, a call to the changelog for that issue says it was flagged at 2019-05-22 15:03:35 and unflagged at 2019-05-23 07:54:02, i.e., it stayed with the flag for 16h 50m 26 s. This is equivalent to 60624 seconds which corresponds to 60624000 milliseconds.

This is not what is stored in the aforementioned custom field.

Although the 60697854 and the 60624000  are somehow close numbers, I have other examples where this difference is even bigger.

I know it's possible to go through all entries in the changelog to find out the date/time the issue was flagged and unflagged. But if Jira can out of the box put this info for me in a field, I prefer using it. :-)

Any clue what is going on?

 

Thanks in advance,

 

Marcelo Fernandes

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events