I am using Jira Cloud. In that while using Script Runner, I am facing this isuue.
I am trying to calculate the Total Time Spent by a Story in "In Progress" Status. So, whenever it moves to "Done" Status, there is custom field which shows the time spent in this format (d h m s).
Note: The Story can be Reopened again. So, the time should be added accordingly. Below is my code for Script Runner
What to do?