This is a Script Field that shows a table with all statuses that the issue has been and the time it has been in, expressed in seconds. The mapping between status and it’s Lozenge is done “manually” throught it’s ID on the function colorCategory.

The code contains HTML tags so I attach the GitHub link to avoid visual problems -> Time in Status
You need to add the Custom Field created on a View Screen and the result will be something like the image.
Hello,
This is very useful in my opinion but I have 2 doubts.
1) The status time can be in format hours:minutes?
2) When the issue passthrough 2 times from the same status, the time is sum in one status or shows 2 times?
Best regards,
LikeLike
Hi Juanjo!
1) Yes, the time format is improvable but was not the focus of the logic so you can express it as you need it.
2) When the issue passthrough 2 times from the same status it will appear 2 times on the table, because the table rows are extracted from Issue History entries, and it will be 2 different entries for each status.
Hope this helps,
Regards!
LikeLike
Hello,
I will try to set this modifications in the code and give you feedback.
Good job!
Best regards.
LikeLike
The following code shows you the time in format hh mm instead of seconds
def hoursRest = (TimeSpent/ (3600))
def hours = hoursRest as Integer
def minutesRest = ((TimeSpent % 3600)/60)
def minutes = minutesRest as Integer
valueToShow = ” ” + (hours as Integer).toString() +”h “+ (minutes as Integer).toString() + “m”
LikeLiked by 1 person
Thanks for your Job!
I’ve updated the repository with usage of your code to fromatting the time in Status.
Regards!
LikeLike