The Time to SLA Custom Field

This page is about Time to SLA for Jira Server users.

The Time to SLA Custom Field helps you track SLAs by showing a countdown to the SLA Goal or overdue time if an SLA is breached. This custom field uses colors and icons to show the status of an SLA. Time to SLA creates this custom field upon installation, but you must add this field to the screens that you want to view.


The Time to SLA Custom Field Colors & Icons

DescriptionColor and Icon

The SLA has not STARTED

The SLA is in PROGRESS

(before critical zone)

The SLA is in PROGRESS

(after critical zone)

The SLA is EXCEEDED

The SLA is COMPLETED

You can click on the field to see details for the SLA and dates.

The Time to SLA Custom Field shows separate fields per SLA if an issue meets more than one SLA.


Change display options

1. Go to SLA Fields.

2. Click  in the row of a custom field in order to change its display options.

3. Go to Display Options.

4. The Display Options screen will appear.

5. Select Time Format to display.

You can see the Sample Time String as you select.

Long format: Displays the duration with day/hour/minute/second units and full localized unit labels.

Short format: Displays the duration with day/hour/minute/second units and abbreviated unit labels.

Shorter format: Displays the duration with hour/minute/second units and abbreviated unit labels.

6. Tick Display SLAs of Linked Issues if you want to view SLAs of linked issues within one another.

7. Select when to display SLA names in the custom field.

8. Tick Show Completed SLAs if you want to see completed SLAs in the custom field.

9. Click Save.


Use in Groovy Script

You can use Time to SLA Custom Field data in the Groovy Script.

Elapsed Percentage

Usage example:

Get Elapsed Percentage
import com.atlassian.jira.component.ComponentAccessor;
import com.atlassian.jira.issue.CustomFieldManager;
import com.atlassian.jira.issue.fields.CustomField;
import com.atlassian.jira.issue.IssueManager;
import com.atlassian.jira.issue.Issue;

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def cField = customFieldManager.getCustomFieldObject("[your_tts_field_id]")
def cFieldValue = issue.getCustomFieldValue(cField)

return cFieldValue[0].elapsedPercentage