How to find smart value of SLA component of JSM issues

Platform Notice: Cloud - This article applies to Atlassian products on the cloud platform.

Summary

Jira admins sometimes need access to the SLA value of a JSM issue. While the SLA value is visible in both due date centric or time centric formats, there is no direct way to access this value because of the way SLA information is stored. This KB will help you to access the SLA values. 

Environment

Jira service management Cloud

Diagnosis

SLAs on a JSM issue allow you to track the status of an SLA by displaying

  • The type of SLA you are measuring (time to resolve, time to first response, etc.) 
  • Whether SLA is met, running, or breached
  • How long you have left until an SLA is breached or how soon is the SLA completed 

However, you can't access the values of the SLA as any other custom field. Also, when you export the SLA information the duration value is exported as text and is displayed in the number of hours/minutes even with the Due date-centric SLA time format.

For example, if you wish to setup a Due date field based on the SLA value, you can highlight the SLA in a different way on the issue for assignee to start working on it - If the Time to response SLA is pending for 1d, you can convert that into a Date and set the value of the Due Date field.

Solution

We will use the same approach as described in https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/ 

Each SLA value of an issue is stored in JSON format. Use Log action in automation to print the smart value of {{issue.<sla_name>}} to see the main objects in the ongoingCycle and completedCycle and see what information you might find useful. Step through each layer of the JSON object, You can drill into these different areas using the "." notation

Here is an automation rule to find the breach time of an issue, you can use this value and store it in a date time custom field as well: 

  1. Create an Automation rule with Scheduled trigger
  2. Add Log action to display the value of the smart value {{issue.<sla_name>}}
  3. Add Create variable action to create a new variable (named SLA for instance) with the value {{issue.<sla_name>.ongoingCycle.breachTime.friendly}}
  4. Add another Log action to display the value of the variable {{SLA.toDate.jiraDate}} 

Last modified on Jan 8, 2024

Was this helpful?

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