Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Scriptrunner Duration in Status code not working as expected Edited

I have used the scripted field from Scriptrunner to calculate the duration of the in progress status on my issues (https://scriptrunner.adaptavist.com/latest/jira/scripted-fields.html#_total_time_this_issue_has_been_in_progress) and that appears to work for everything except the Beginning status.

I use the code above for a scripted field that looks at the beginning status in Jira.  It is returning a negative number.  So, for instance, if my status when an item is created is PENDING APPROVAL, the code seems to be returning a negative number all the time an doesn't give me the actual time the item is in that status.  

Looking at the code, it appears it should be working properly. 
my next test will be to add this to another system to ensure it's not just in this server.

Any other suggestions?

1 answer

1 accepted

0 votes
Answer accepted
Benjamin Community Leader Jul 19, 2021

Hi @Shannon Wright ,

 

This article will probably address your issue.

 

https://community.atlassian.com/t5/Jira-questions/How-to-calculate-the-time-in-open-status/qaq-p/639181

 

Hope this helps.

 

Thanks,

 

Ben

That was it.  Thank you, that's exactly what I was needing.

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you