Templates for field values

Data Center This page documents Time in status, Timer, Stopwatch and Calendar fields for Jira Data Center and Server. On Jira Cloud? See Time in Status (Forge) for Jira Cloud.

You can configure how to display the values of the Time in status, Timer, and Stopwatch fields. This is done through the configuration of the fields.

The template uses velocity and a number of predefined variables to render the value. Thanks to this, you can use html to set absolutely any kind of your fields, and not just the one provided by the vendor.

In the menu with all templates, you can see what templates are available and where they are used.

1 screenshot

In the template itself, you can use HTML, JavaScript and predefined variables that depend on the selected field type.

A small example of what you can do:

  • Display the necessary data about the timer in the table:

2 screenshot

File: demo Templates for field values.vm

<table class='aui'>
    <tr>
      <td>
        real time
      </td>
      <td>
         $timeFormatUtils.secondsToFormat($value.timeSpentRealTime, $timerFieldConfig.showFieldFormat)
      </td>
    </tr>
    <tr>
      <td>
        pause time
      </td>
      <td>
        $timeFormatUtils.secondsToFormat($value.pauseTime, $timerFieldConfig.showFieldFormat)
      </td>
    </tr>
</table>
  • Connect this template in the field settings:

    4 screenshot

  • And this is how the timer value in the task will now look like:

3 screenshot

Now you are not limited by anything and can customize the display of values as you like.


JiBrok time in status Time in status | SLA | Timer | Stopwatch
Migration
Release notes
Tutorials
Settings
Troubleshooting
Work calendars
Time in status
Timers and Stopwatches
Stopwatch
Timer
Additional functions
Issue panels
Reports
Field Helpers
Other fields
API
Reference information