Days the ticket is in current status

santosh srirangam October 7, 2015

Hello,

I need  to Create field that will calculate the numbers of days that a CR has been in the current status.

For example. we move the status of the CR to "Pending". the field : Days since Status change - would count the number of days until the CR is changed to the next status. once the CR is moved from Pending to next status the count would reset and count until next change of status.

 

Regards,

Santosh

2 answers

0 votes
Akeles
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.
December 14, 2015

Hi @santosh srirangam, you might want to check out our Days Elapsed Plugin to see if it fits your requirements.

The custom field can calculate the number of working days and display a traffic light to indicate the SLA. The counting is triggered on/off by firing post functions. No coding is required.

Hope it helps. 

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 8, 2015

You're going to need some coding for that.  Have you got Script Runner or one of the other scripting add-ons?

santosh srirangam October 9, 2015

No.

We don't have any similar add-ons.

Regards 

Santosh 

Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 9, 2015

Ok. There are several approaches to this: * create a date/time field (only on the view screen) and have post-functions stick "current date" into it on every transition * Do much the same in a listener * Write a calculated field that works out the date/time of the last status change from the issue history You'll notice there's a flaw with those - they all give the user the date/time of the last change, not "time since". The reason for that is that the date/time is a static value. The time elapsed is dynamic - it's a new value every time you look at the issue. JIRA doesn't really have any way to do that. If you definitely need a dynamic value, you'll need something a bit more clever - you'll still need to code for one of the tricks above, but then you'll need more code to display it as a dynamic (now - last date change) and if you do it the way I think you'd need to (javascript), you won't get it coming out as an elapsed time on reports or downloads either.

Ankit Patel January 19, 2018

Hi Nic, 

 

I have scriptrunner and am looking for a same field which would determine the time in status. can you help me with some code on that? 


Thanks
Ankit

Jagan Shankar December 5, 2019

Nic - I know this is very old thread but still looking for something similar.

I need a field which populates current status cumulative duration. Currently I have placed the script in post-function on transition but it updates only on transition, but it can't tell the current duration in the current status, any pointers will be helpful.

Suggest an answer

Log in or Sign up to answer