How to calculate the number of days the issue is in a particular status?

Suvidhaa Subramani September 14, 2022

Hi Team,

I need to calculate the number of days the issue was in particular status. I checked the below link, but it is showing the result in format of weeks, days, minutes..

https://community.atlassian.com/t5/Jira-questions/How-to-show-the-no-of-days-the-issue-is-being-worked-on/qaq-p/1430109

 

I am using Script runner plugin. Could you please help me in getting number of days as a integer value in the field

1 answer

1 accepted

0 votes
Answer accepted
Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2022

Hi @Suvidhaa Subramani 

 

Please check Script runner library. IMHO this can be helpful - https://library.adaptavist.com/entity/count-the-time-an-issue-was-in-a-particular-status

 

Regards,

Seba

Suvidhaa Subramani September 14, 2022

 

Hi @Sebastian Krzewiński 

This code returns the time in Week, days format.

my requirement is to have only number of days.

For example,

If the total time in that particular status is 10 days, then the code is returning 1W 3D

But I am expecting 10 in the field

Could you please help me

Suvidhaa Subramani September 14, 2022

@Ram Kumar Aravindakshan _Adaptavist_ 

Could you please help me?

Sebastian Krzewiński
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 14, 2022

@Suvidhaa Subramani as I see script return time in seconds. What I see from your example is that Jira is converting time to this format. Please check type of your field and see this doc how to fix this - https://community.atlassian.com/t5/Jira-Core-Server-questions/Time-Spent-Display-format-change/qaq-p/1302371

 

Regards,

Seba

Suvidhaa Subramani September 14, 2022

I changed my duration field to number field and converted the milliseconds answer to days. It worked

Like Sebastian Krzewiński likes this

Suggest an answer

Log in or Sign up to answer