Using JWT Calculated Number Field how to get time between Created and a Status

Marc Jason Mutuc
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.
January 30, 2019

I'm currently using JWT Calculated Number Field for getting the resolution time (resolution date - created date)

 

Now, I'm trying to create several time trackers and would like to ask for help since I can't get it working. 

 

 For example, time between created and change status to in progress. Or created to first public comment.

1 answer

0 votes
Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 5, 2019

Hi  @Marc Jason Mutuc,

regarding your status changes, the timesOfTransition might help solving your request (see the comprehensive list here: https://apps.decadis.net/display/JWT/Expression+Parser).

An example:

first(timesOfTransition("", "In Progress"))

This expression returns the timestamp when the issue was first transitioned from any status to In Progress.

Regarding your second use case referring to adding a public comment, I'm not aware of any function that is capable of extracting this timestamp. However, I'll try to figure it out and will get back to you here.

Cheers,
Thorsten

Marc Jason Mutuc
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.
February 6, 2019

Thanks! I've also been experimenting on the fields a bit. And for the number field, when you extract, it would always be in milliseconds. The extract is in csv. Is it possible to make the extract be what the display is or at list convertible into seconds?

Thorsten Letschert _Decadis AG_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
February 7, 2019

Hi @Marc Jason Mutuc,

so you're trying to export your issue navigator result to *.CSV and receive your durations in pretty short format, e.g. 1d 1h 34m, instead of 920611160000000 ms?

If this value is for reporting purposes mainly, I'd rather suggest using a Calculated Text Field with the following expression:

shortFormatDuration(timeInStatus("Done"))

That way, the display in Jira stays the same, but the *.CSV export will also include the pretty format 1d 1h 34m.

Does this help with your requirement?

Marc Jason Mutuc
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.
February 12, 2019

so you're trying to export your issue navigator result to *.CSV and receive your durations in pretty short format, e.g. 1d 1h 34m, instead of 920611160000000 ms? >>> On display it would say 1d 1h 34m but on extract it would instead be 920611160000000.

I'll check it out and let you know how it goes. Thanks!

Like Max Foerster - K15t likes this

Suggest an answer

Log in or Sign up to answer