The following article shows how to add script field in right issue column view under Time Tracking section.

For this example, will be necessary:

  1. Create a new script field with the information that we can display.
  2. Create a new section in the right context below Time Tracking.
  3. Add the script field created to the new section created.

Let’s go to it


In this example, the information of this field will be worklog of the current issue with the sum of all the worklog saved in related issues only for a issue type “Rework”.

Go to script fields and create a new Script field.

Field Name: Aggregate time spent

Template: Duration (time-tracking)


The following link contains the code of ScriptField

In this point, the most important is return the value as Long because Time Spent works with Long values. If you want to apply the template Duration (time-tracking) you need Long value.

Now, if you add the scriptfield to some screen and this issue has related issues type “Rework” with logged time, this field will appear dates section.

But, we want to see this information in right section (Time Tracking) because this is time logged and it is interesting compare it with all logged information.


Go to Fragments and create a Script Fragment “Show a web panel”

Note: Show new section Time Tracking

Location: atl.jira.view.issue.right.context

Key: aggregate-time-spent

Menu text: Time Tracking (extra information)

Weight: 100

Condition: Nothing for testing, in production you should add query for condition.


Provided class/script

The following link contains the previous code for the web panel

TimeHHMM convert the Long (standard time spend format) to HHMM, this function is necessary because we are going to show a HTML table. If you don’t use this function, the field will be shown in seconds.

Also, the information will be shown inside a HTML table shows it with a better format, this is optional, you can show the variable without HTML table.


I hope it’s helpful


Posted by:juanjomarchal

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 )

Facebook photo

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

Connecting to %s