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.

Posted by:eloii23

5 replies on “Script Field – Time in Status

  1. 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,


    1. 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,


  2. 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”

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s