How to display elapsed time instead of remaining time for SLAs

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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
  • Add an Advanced compare condition to check that the SLA (e.g., Time to first response) is not empty:

       

  • Add Action: Type Edit issue > select the custom field created from the drop-down to store the following value:

    {{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:

    {{now.diff(now.plusMillis(issue.Time to resolution.completedCycles.elapsedTime.millis.sum)).prettyPrint}}

  • Click Save and publish the rule. 

         

  • 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: 

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


Last modified on Mar 15, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.