Elapsed time between creation and resolution in duration format.
Configuration
Create a custom smart number field and use the General parsing mode.
Expression
%{{issue.resolutionDate} != null ? (({issue.resolutionDate} - {issue.created}))
: null}
The duration might be retuned in a combination of years, weeks, days, hours or minutes.
Display as
Duration
Formatting style
Long
Details
1. What does the expression do?
The expression calculates the amount of time that has passed between when a work item was created and when it was resolved. The result is shown as a duration (for example, in days, hours, or minutes).
2. Step-by-step breakdown
Let's break it down:
-
{issue.resolutionDate}: This refers to the date and time when the work item was marked as resolved. -
{issue.created}: This refers to the date and time when the work item was created. -
{issue.resolutionDate} != null: This checks if the work item has actually been resolved (i.e., the resolution date exists). -
? ... : ...: This is a conditional operator. If the resolution date exists, it performs the calculation; if not, it returnsnull(meaning no value). -
({issue.resolutionDate} - {issue.created}): This subtracts the creation date from the resolution date, giving the elapsed time in milliseconds.
3. Examples
-
If a work item was created on January 1st at 10:00 and resolved on January 3rd at 10:00, the expression would return two days in milliseconds, converted later to
2 days. -
If a work item has not been resolved yet, the expression returns
null(no value), converted later toNone.
4. Real-life use cases
-
Tracking how long it takes to resolve customer support tickets.
-
Measuring the average time to resolution for bugs or tasks in a project.
-
Identifying work items that take unusually long to resolve, so you can investigate further.