How to display elapsed time instead of remaining time for SLAs

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

This article offers a workaround for obtaining the real elapsed time of an SLA for a ticket in a format that is easy to understand, using an automation rule in Jira Service Management.

Additionally, there is a feature request submitted to address this need: JSDSERVER-78-Ability to view Elapsed Time as a column in Issue Navigator or in Export.

Environment

Any version of Jira Service Management.

Solution

  • Create a Text Field (single line) custom field to store the SLA elapsed time value, e.g., "SLA Elapsed Time"

  • Navigate to the Project Settings > Automation and Create a new rule, e.g., "SLA Elapsed Calculation":

  • Configure the automation rule as the following:

  • Add a New Trigger of type Scheduled

    (Auto-migrated image: description temporarily unavailable)
  • Add an Advanced compare condition to check that the SLA (e.g., Time to first response) is not empty:

(Auto-migrated image: description temporarily unavailable)
  • Add Action: Type Edit issue > select the custom field created from the drop-down to store the following value:

    1 {{issue.Time to resolution.completedCycles.elapsedTime.millis.sum}}

    If you would like to get the cumulative value for the elapsed time in a friendly format you can use the following:

    1 {{now.diff(now.plusMillis(issue.Time to resolution.completedCycles.elapsedTime.millis.sum)).prettyPrint}}
    (Auto-migrated image: description temporarily unavailable)
  • Click Save and publish the rule. 

(Auto-migrated image: description temporarily unavailable)
  • If you like to add the value of the calculated elapsed time to the audit log you can add a Log action and use the following to display the value of the calculated field: 

    1 {{issue.Time to first response.completedCycles.elapsedTime.friendly}}

Updated on March 17, 2025

Still need help?

The Atlassian Community is here for you.