Breadcrumbs

Time since creation

📚

Return the time that has passed since the creation of the current work item in duration format.

Configuration

Create a Custom smart number field and use the General parsing mode.

Expression

 %{{system.currentDateTime} - {issue.created}}

Display as

Number

Display as

Duration

Formatting style

Long

Used parser functions

The links lead to the JWTC documentation because the parser functions are shared functionalities.

Details

1. What does the expression do?

The expression calculates the amount of time that has passed since a work item was created. The result is shown in a duration format (for example, "3 days, 4 hours").

2. Step-by-step breakdown

Let’s break it down:

  • {system.currentDateTime}: This retrieves the current date and time (the exact moment when the calculation is performed).

  • {issue.created}: This retrieves the date and time when the work item was originally created.

  • The minus sign (-): This subtracts the creation date/time from the current date/time.

  • %{ ... }: This syntax is used to interpret the elements within as an advanced expression.

The result is the duration between the creation of the work item and now in milliseconds.

3. Examples

  • If a work item was created on November 10th at 10:00 AM, and you view it on November 13th at 12:00 PM, the expression would return "3 days, 2 hours".

  • If a work item was created just 30 minutes ago, the expression would return "30 minutes".

4. Real-life use cases

  • Displaying how much time has passed since the work item was created.