This template displays the time spent ratio of the current work item, i.e., the division of the time spent by the original estimate of the current work item multiplied by one hundred.
If the work item was not estimated or has no work logged, “None” will be displayed.
Configuration
To use the Time Spent Ratio template, simply select it from the template grid. Filter by KPI to find it faster.
Parameters
This template does not require any additional parameter configuration.
Expert mode
If you switch to Expert mode you can see the formula field in the Expression Parser. You can now tweak the expression to create a custom formula field based on this template.
Expression
General expression:
%{%{issue.originalEstimate} != null AND %{issue.timeSpent} != null ? {issue.timeSpent} / {issue.originalEstimate} * 100 : null}
Display as
Number
Formatting style
Custom pattern
Pattern
Use the following pattern to return actual percentages, e.g. 75 %.
##.# %
Details
1. What does the expression do?
The expression calculates the division of the time spent by the original estimate of the current work item multiplied by one hundred. In other words, it shows how much of the planned work has actually been completed, in percentage terms.
2. Step-by-step breakdown
Let’s break it down:
-
%{ ... }— This is the syntax for the expression parser, which evaluates the formula inside. -
{issue.originalEstimate}— This refers to the original estimated time for the work item. -
{issue.timeSpent}— This refers to the total time that has been logged as spent on the work item. -
{issue.originalEstimate} != null AND {issue.timeSpent} != null— This checks if both the original estimate and the time spent have values (i.e., they are not empty). -
? ... : ...— This is a conditional (if-else) operator. If the condition before the?is true, the part after the?is used; otherwise, the part after the:is used. -
{issue.timeSpent} / {issue.originalEstimate} * 100— If both values exist, this divides the time spent by the original estimate and multiplies by 100 to get a percentage. -
null— If either value is missing, the result is set to null (“None” will be displayed).
3. Examples
-
If a work item was estimated at 8 hours and 4 hours have been logged as spent:
-
Calculation: (4 / 8) * 100 = 50%
-
-
If a work item has no original estimate or no time logged:
-
The result will be “None” (nothing is shown).
-
4. Real-life use cases
-
Project managers can quickly see how much of the planned work has been completed for each work item.
-
Teams can identify work items that are taking longer than estimated by seeing percentages over 100%.
-
If a work item shows “None,” it means either no estimate was set or no time has been logged, which could indicate missing data.