Installation

  1. Log into your JIRA instance as an admin.
  2. Click the admin dropdown and choose Atlassian Marketplace.
    The Manage add-ons screen loads.
  3. Click Find new add-ons from the left-hand side of the page.
  4. Locate Time to SLA via search.
    The appropriate add-on version appears in the search results.



  5. Click Try free to begin a new trial or Buy now to purchase a license for Time to SLA.
    You're prompted to log into MyAtlassian. Time to SLA begins to download.
  6. Enter your information and click Generate license when redirected to MyAtlassian.
  7. Click Apply license.
    If you're using an older version of UPM, you can copy and paste the license into your JIRA instance.
To find older Time to SLA versions compatible with your instance, you can look through our version history page.

Setting calendar

  1. Setting working calendar

    There is built-in calendars: everyday 7x24 and weekdays 09:00 to 18:00
    But you can simply define as many calendar as you want so that SLAs can be run against separate calendars.

  2. Setting non-working days

    Easy to add non-working days



  3. Use new Calendar page (BETA)

    You can also use our new experimental Calendar page. Both working and non-working days are in the same page.



SLA Definition

Defining SLAs according to your workflows is as simple as below:
After selecting JIRA Workflow, click on "Add New SLA Definition" button.



SLA form will come to display as below



Description is the name of the SLA which will be displayed to identify.
Priority, SLAs can be differentiated according to issue's priority
SLA Start, SLA can be started via status or via given date.
If status option is selected, status (multiselect) drop down will be displayed and the status(es) that will start SLA can be selected. If any issue's status changes to one of the selected statuses, then SLA will start immediately.
If 'date custom field' option is selected, dropdown will be displayed showing all applicable date and datetime custom fields. SLA starts in time of selected custom field's value.
SLA End, similar to SLA Start, SLA cen be finished via status or date custom field. If status is defined, then the SLA will end when the issue's status changes into selected status, or changes into one of the selected statuses. If 'date custom field' option is defined for SLA End, then any issue's SLA will end in time of selected custom field's time value. Please bear in mind that SLA End Date is not the 'negotiation date', it is the 'actual end date' of the issue.
Selected date custom fields will determine the actual start/end date of the SLA.
Start/End SLA custom field support is available since TTS 5.10.0 for JIRA 6.3 - 6.4.12 or TTS 6.5.0 for JIRA 7.x
SLA value is the duration of SLA as time string (e.g. 2d 4h 30m).
SLA Deadline/Negotiation Date Field is the alternative to SLA value. Sometimes rather than SLA duration value, a deadline can be more meaningful.
SLA Deadline/Negotiation Date custom field support is available since TTS 5.13.0 for JIRA 6.3 - 6.4.12 or TTS 6.8.0 for JIRA 7.x
What is the difference between SLA Start/End and SLA Deadline Fields?
Even though they seem to be similar, they are not. We can define those fields simply as :
  • SLA Start Date Field is the field which stores actual start date of the operation. In some scenarios, operation related to the issue can start before the issue creation or issue's arrival to any status.
  • SLA End Date Field is the field which stores actual end date of the operation. Similar to SLA Start, the process can continue after the issue's resolution
  • SLA Negotiation or Deadline Date Field stores the expected SLA target date. If this field is selected, the counter will count till this field.

If the selected field is date only field (such as due date or date custom field) then by default time section will be 00:00 AM. However, 'Time Part' field will be seen to set time part if date only field is selected.

Working calendar, can be selected as 7x24 or any "Working Calendar" which can be defined in 'Working Hours' link in Time to SLA Plugin menu.
Multiple transitions, this option should be enabled if the issue can have multiple transitions till end (according to workflow). For instance, assume we have Open, In Progress, Resolved and Closed statuses in workflow, and we want to define SLA from 'Open' to 'Closed' which can be done by at least two transitions: 'Open' -> 'In Progress', then 'In Progress' -> 'Closed'.
Only first execution, check this field, if you want to run this SLA only for the first execution. If the issue goes through the same triggering conditions, it will not calculate any more. If unchecked, it will sum execution times.
Also additional conditions can be added to SLA definition so that issues that SLA should be applied can be filtered accordingly. For example issuetype in (Bug, Task) JQL definition will make SLA only valid for Bug and Task typed issues.

There is no limit on the count of defined SLAs. All SLAs are grouped by workflow selection.




By clicking cog icon SLA definition can be edited, deleted, cloned. Also there are handy settings like Pause SLA, Reset SLA, and SLA Notifier



Pause SLA link displays a dialog in which SLA can be configured to have paused staus(es). If the issue reaches to one of these selected "Paused Statuses" the timers will immediately stop to count for SLA.



Reset SLA link displays below dialog. When one of the selected fields of the issue changes, the SLA timer resets immediately.



SLA Notifier(s) link displays a dialog in which SLA notifiers can be configured, so that selected people can be notified before the SLA exceeds.
SLA Notifier is available since TTS 5.5.0 for JIRA 6.3 - 6.4.12 or TTS 6.0.0 for JIRA 7.x



You can also be notified after the SLA Target Date, to configure such a notifier just type minus before the 'Notify Before' parameter. For instance, to be notified 10 minutes after the overdue, type -10m
Email subject and body can be fully dynamic.
Parameters that can be passed to SLA Notifier
  • $slaDescription
  • $slaValue
  • $slaStartDate
  • $slaTargetDate
  • $slaNotifyBefore
  • $originStatus
  • $targetStatus
  • $issue can be used get any issue parameter (e.g. $issue.summary)
  • $customFieldManager can be used to see custom field values
    (e.g $issue.getCustomFieldValue($customFieldManager.getCustomFieldObject('customfield_11100')))


In the following part, people who want to be notified can be configured.



There is a 'Preview' button to test the email template, type sample issue key and press the button.



From TTS 5.15.0 for JIRA 6.3 - 6.4.12 or TTS 6.10.0 for JIRA 7.x on, multiple SLA Notifiers can be defined.

Besides the cog icon, there are some icons / lozenges which show whether there is additional configuration for SLA.
JQL means there is additional JQL defined for this SLA.
PAUSE means there is/are paused status(es) for this SLA.
RESET means there is/are reset field(s) for this SLA.
means there is notifier for this SLA.

Custom fields

  1. Time to SLA custom field shows the remaining time as countdown regarding SLA value and working calendar.
    * This custom field is automatically created upon add-on installation. But please make sure that you add this field to appropriate screen
    * Access and visibility of this field can be configured under JIRA Admin > Add-ons > Field Permissions
    * Colors change depending on the time remaining to the SLA Target Date and the configuration under JIRA Admin > Add ons > Time to SLA > Custom Fields

    * GREEN safe zone
    * YELLOW time is ticking
    * RED SLA breaches
    All these lozenges and icons are clickable and directly take to the configuration pop ups.
    These configurable coloring features comes with TTS 5.5.0 for JIRA 6.3 - 6.4.12 or with TTS 6.0.0 for JIRA 7.x

    * If you want to create more Time to SLA custom fields, please go to JIRA Admin > Add-ons > Time To SLA > Custom Fields menu section.

    Here are some samples of Time to SLA custom fields





    Clicking on the field shows details for the SLA and dates.



    By default, "Time to SLA" custom field diplays all available SLAs according to current status.
    × Warning! It is strongly recommended that you use JQL functions instead of custom field searchers to get more accurate results.


    You can configure each "Time to SLA" custom field to display only specified SLAs and track them within separate fields.

    To configure each TTS custom field, just explore settings icon and click Configure

    Selected SLAs are shown. To change settings, click on "Edit Including SLAs" link

    Enable SLAs that you want to track within this custom field and click Save button

  2. Overdue Status custom field shows all overdue data of the issue so far.
    * This custom field is automatically created upon add-on installation. But please make sure that you add this field to appropriate screen
    * Access and visibility of this field can be configured under JIRA Admin > Add-ons > Field Permissions
    * If you want to create more "Overdue Status" custom fields, please go to JIRA Admin > Add-ons > Time To SLA > Custom Fields

    * If you add "Overdue Status" column to the issue navigator, you will see issues with overdue colored as red (or any color that you configure).
    Below is the screenshot after clicking overdue field.



  3. SLA Indicator custom field detects all SLAs and shows whether issue met SLA or not so far
    * This custom field is not automatically created upon add-on installation.
    * Access and visibility of this field can be configured in JIRA Admin > Add-ons > Time To SLA > Custom Fields > Field Permissions
    To create "SLA Indicator" custom field, please go to JIRA Admin > Add-ons > Time To SLA > Custom Fields .

    * If all SLAs are met so far, MET lozenge will be displayed in "SLA Indicator" field.
    * If, at least one SLA fails EXCEEDED lozenge will be displayed which is clickable. If clicked, you will see details of the SLA and issue history according to SLA similar to following :



    * You can customize SLA Indicator to work according to selected SLAs (just like other custom fields). If you go to configuration page of SLA Indicator custom field(s), you will see listed SLAs. Select any of them, and SLA Indicator will display MET if all these selected SLAs are met, otherwise EXCEEDED if any of them has overdue

    * You can customize SLA Indicator text messages under TTS custom field configuration page. Please do not forget to re-index JIRA if you want to use this field in JQL conditions.



  4. SLA Overview custom field and tab panel are very handy fields in which you can see all (passed or waiting) SLA activities
    * Tab panel is displayed in issue main view, while custom field is designed for issue navigator.
    * Red, Yellow and Green bullets indicate SLA Overdue, SLA In Progress and SLA Met.
    * Also you can find total working duration and paused duration as well.
    * SLA Overview tab panel is automatically displayed in issue main page.
    * Access and visibility of these fields can be configured under JIRA Admin > Add-ons > Time To SLA > Custom Fields > Field Permissions
    * SLA Overview custom field is not automatically created upon add-on installation, you can create in
    To create "SLA Overview" custom field, please go to JIRA Admin > Add-ons > Time To SLA > Custom Fields > Field Permissions menu section.


JQL functions

1tts.issuesHaveSomeMetSlas filters issues which have at least one SLA that met targets.
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesHaveSomeMetSlas() 
						        issue in tts.issuesHaveSomeMetSlas(22)
						        issue in tts.issuesHaveSomeMetSlas('SLA Name') 
						        issue in tts.issuesHaveSomeMetSlas(22, 23, 30)
						        issue in tts.issuesHaveSomeMetSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
						        
2tts.issuesHaveSomeExceededSlas filters issues which have at least one exceeded SLA. SLAs which are not completed but already have a breach are also included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesHaveSomeExceededSlas() 
						        issue in tts.issuesHaveSomeExceededSlas(22)
						        issue in tts.issuesHaveSomeExceededSlas('SLA Name') 
						        issue in tts.issuesHaveSomeExceededSlas(22, 23, 30)
						        issue in tts.issuesHaveSomeExceededSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
3tts.issuesHaveSomeSlasInProgress filters issues which have at least one SLA that is still uncompleted and do not have breach.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesHaveSomeSlasInProgress() 
						        issue in tts.issuesHaveSomeSlasInProgress(22) 
						        issue in tts.issuesHaveSomeSlasInProgress('SLA Name')
						        issue in tts.issuesHaveSomeSlasInProgress(22, 23, 30) 
						        issue in tts.issuesHaveSomeSlasInProgress('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
4tts.issuesHaveSomePausedSlas filters issues which are in one of the paused status(es).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesHaveSomePausedSlas() 
						        issue in tts.issuesHaveSomePausedSlas(22)
						        issue in tts.issuesHaveSomePausedSlas('SLA Name') 
						        issue in tts.issuesHaveSomePausedSlas(22, 23, 30)
						        issue in tts.issuesHaveSomePausedSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
5tts.issuesHaveAllSlasMet filters issues which have met all SLA targets.
It has optional one or more parameters (SLA Id/Name values) to filter against SLA.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: If no parameter is given, it searches issues that met all SLAs (both completed and uncompleted)
If any parameter is given, it searches issues that met all SLAs that are given as parameters (both completed and uncompleted)

Some samples:
								issue in tts.issuesHaveAllSlasMet() 
						        issue in tts.issuesHaveAllSlasMet(22)
						        issue in tts.issuesHaveAllSlasMet('SLA Name') 
						        issue in tts.issuesHaveAllSlasMet(22, 23, 30)
						        issue in tts.issuesHaveAllSlasMet('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
6tts.issuesHaveNoExceededSlas filters issues which have no exceeded SLAs. (both completed and uncompleted SLAs).
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesHaveNoExceededSlas() 
						        issue in tts.issuesHaveNoExceededSlas(22)
						        issue in tts.issuesHaveNoExceededSlas('SLA Name') 
						        issue in tts.issuesHaveNoExceededSlas(22, 23, 30)
						        issue in tts.issuesHaveNoExceededSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
7tts.issuesExceededAmongCompletedSlas filters issues which have at least one exceeded SLA among completed ones. Uncompleted SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesExceededAmongCompletedSlas() 
						        issue in tts.issuesExceededAmongCompletedSlas(22)
						        issue in tts.issuesExceededAmongCompletedSlas('SLA Name') 
						        issue in tts.issuesExceededAmongCompletedSlas(22, 23, 30)
						        issue in tts.issuesExceededAmongCompletedSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
8tts.issuesExceededAmongUncompletedSlas filters issues which have at least one exceeded SLA among uncompleted ones. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesExceededAmongUncompletedSlas() 
						        issue in tts.issuesExceededAmongUncompletedSlas(22)
						        issue in tts.issuesExceededAmongUncompletedSlas('SLA Name') 
						        issue in tts.issuesExceededAmongUncompletedSlas(22, 23, 30)
						        issue in tts.issuesExceededAmongUncompletedSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
9tts.issuesNotExceededAmongCompletedSlas filters issues which have no exceeded SLA among completed ones. Uncompleted SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesNotExceededAmongCompletedSlas() 
						        issue in tts.issuesNotExceededAmongCompletedSlas(22)
						        issue in tts.issuesNotExceededAmongCompletedSlas('SLA Name') 
						        issue in tts.issuesNotExceededAmongCompletedSlas(22, 23, 30)
						        issue in tts.issuesNotExceededAmongCompletedSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
10tts.issuesNotExceededAmongUncompletedSlas filters issues which have no exceeded SLA among uncompleted ones. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: It has optional one or more parameters (SLA Id/Name values) to filter against SLA.

Some samples:
								issue in tts.issuesNotExceededAmongUncompletedSlas() 
						        issue in tts.issuesNotExceededAmongUncompletedSlas(22)
						        issue in tts.issuesNotExceededAmongUncompletedSlas('SLA Name') 
						        issue in tts.issuesNotExceededAmongUncompletedSlas(22, 23, 30)
						        issue in tts.issuesNotExceededAmongUncompletedSlas('SLA Name 1', 'SLA Name 2', 'SLA Name 3')
11tts.issuesWithRemainingTimeMoreThan filters issues which still have more time than the specified parameter. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesRemainingSlaGreaterThan('3h')  
						        issue in tts.issuesRemainingSlaGreaterThan('2d 4h', 22)
						        issue in tts.issuesRemainingSlaGreaterThan('2d 4h', 'SLA Name')  
						        issue in tts.issuesRemainingSlaGreaterThan('3d 5h', 22, 23, 30)
						        issue in tts.issuesRemainingSlaGreaterThan('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
12tts.issuesWithRemainingTimeLessThan filters issues which have less time remaining than the specified parameter. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithRemainingTimeLessThan('3h')  
						        issue in tts.issuesWithRemainingTimeLessThan('2d 4h', 22)
						        issue in tts.issuesWithRemainingTimeLessThan('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithRemainingTimeLessThan('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithRemainingTimeLessThan('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
13tts.issuesWithBreachLongerThan filters issues which have a breach longer than the given parameter (both for completed and uncompleted SLAs).
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachLongerThan('3h')  
						        issue in tts.issuesWithBreachLongerThan('2d 4h', 22)
						        issue in tts.issuesWithBreachLongerThan('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachLongerThan('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachLongerThan('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
14tts.issuesWithBreachShorterThan filters issues which have a breach shorter than the given parameter (both for completed and uncompleted SLAs).
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachShorterThan('3h')  
						        issue in tts.issuesWithBreachShorterThan('2d 4h', 22)
						        issue in tts.issuesWithBreachShorterThan('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachShorterThan('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachShorterThan('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
15tts.issuesWithBreachLongerThanAmongCompletedSlas filters issues which have a breach longer than the given parameter among completed SLAs. Uncompleted SLAs are not included
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachLongerThanAmongCompletedSlas('3h')  
						        issue in tts.issuesWithBreachLongerThanAmongCompletedSlas('2d 4h', 22)
						        issue in tts.issuesWithBreachLongerThanAmongCompletedSlas('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachLongerThanAmongCompletedSlas('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachLongerThanAmongCompletedSlas('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
16tts.issuesWithBreachLongerThanAmongUncompletedSlas filters issues which have a breach longer than the given parameter among uncompleted SLAs. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachLongerThanAmongUncompletedSlas('3h')  
						        issue in tts.issuesWithBreachLongerThanAmongUncompletedSlas('2d 4h', 22)
						        issue in tts.issuesWithBreachLongerThanAmongUncompletedSlas('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachLongerThanAmongUncompletedSlas('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachLongerThanAmongUncompletedSlas('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
17tts.issuesWithBreachShorterThanAmongCompletedSlas filters issues which have a breach shorter than the given parameter among completed SLAs. Uncompleted SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachShorterThanAmongCompletedSlas('3h')  
						        issue in tts.issuesWithBreachShorterThanAmongCompletedSlas('2d 4h', 22)
						        issue in tts.issuesWithBreachShorterThanAmongCompletedSlas('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachShorterThanAmongCompletedSlas('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachShorterThanAmongCompletedSlas('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 
18tts.issuesWithBreachShorterThanAmongUncompletedSlas filters issues which have a breach shorter than the given parameter among uncompleted SLAs. Completed SLAs are not included.
Completed SLA: SLA that corresponds origin and target rules. For instance, if SLA is defined from Open to Closed, and the issue has been from Open to Closed then this SLA is completed.
Uncompleted SLA: SLA corresponds origin rule, but not target yet. Uncompleted SLA can not be MET, but can be PROGRESS (SLA target date has not been reached) or EXCEED (SLA target date has passed).
Parameters: Timestring, the first parameter is required, followed by optional SLA Id/Name parameter(s)

Some samples:
								issue in tts.issuesWithBreachShorterThanAmongUncompletedSlas('3h')  
						        issue in tts.issuesWithBreachShorterThanAmongUncompletedSlas('2d 4h', 22)
						        issue in tts.issuesWithBreachShorterThanAmongUncompletedSlas('2d 4h', 'SLA Name')  
						        issue in tts.issuesWithBreachShorterThanAmongUncompletedSlas('3d 5h', 22, 23, 30)
						        issue in tts.issuesWithBreachShorterThanAmongUncompletedSlas('3d 5h', 'SLA Name 1', 'SLA Name 2', 'SLA Name 3') 


Re-generating SLA data for existing issues

From TTS 5.0.0 version on, we have launched a new model. Old model was calculating SLA data by traversing all issue's change history everytime issue was hit or issue's status was changed while new model stores data in database, so it does not re-calculate.
New model generates data by listening events, so it can not generate SLA data for already existing issues automatically.
However Time to SLA Plugin provides an SLA data generator for those existing issues. Under JIRA Admin > Add-ons > Time to SLA Plugin click "SLA for Existing Issues" link.
Type JQL for issues that you want to generate SLA data.

SLA Report

Available since TTS 5.6.0 for JIRA 6.3 - 6.4.12 or TTS 6.1.0 for JIRA 7.x
Within project reports section, there is brand new SLA Report
It can be configured to display results against favorite filters, and SLA status
Sortable and filterable results can also be exported to XLS




You can also configure and add JIRA fields/custom fields to the report.



× Warning! Please use TTS menu > SLA Report to see those field options.

SLA Reset Workflow post function

Available since TTS 5.8.0 for JIRA 6.3 - 6.4.12 or TTS 6.3.0 for JIRA 7.x
Add this post function to any transition to reset SLA data.




Configure which SLAs are needed to be reset within the transition



That's it.



Publish the workflow to see post function in action.

SLA Status Pie Chart Gadget

SLA Status Pie Chart Gadget displays overall SLA status according to your favorite filter




Averaged SLA Duration Stack Bar Chart Gadget

Available since TTS 5.9.0 for JIRA 6.3 - 6.4.12 or TTS 6.4.0 for JIRA 7.x
Averaged SLA Duration Stacked Bar Chart Gadget displays average working duration for selected SLA(s)




As seen in the image above, there are markers according to SLA values. Below configuration screen shows how easy to configure the gadget



  • Project or Saved Filter filters issues
  • Weekly/Monthly displays results grouped by week or month
  • SLA(s) select SLA(s) to see working duration according to these SLA definitions
  • Time interval y-axis can be seconds | minutes | hours | days
  • Custom gadget title is the custom title that will be displayed on top of gadget, if left blank, "TTS - Averaded Working Duration According to SLAs Stacked Bar Chart" will be displayed

SLA Success/Fail Rates Chart Gadget

SLA Success/Fail Rates Chart Gadget Displays success and fail rates of selected SLAs as a stacked bar chart



Available since TTS 5.21.0 for JIRA 6.3 - 6.4.12 or TTS 6.16.0 for JIRA 7.x




  • Project or Saved Filter filters issues
  • SLA(s) select SLA(s) to see as a bar in y-axis
  • Include progressing SLAs? to include SLAs that are not completed yet
  • Custom gadget title is the custom title that will be displayed on top of gadget, if left blank, "TTS - Averaded Working Duration According to SLAs Stacked Bar Chart" will be displayed

SLA Success/Fail Counts Chart Gadget

SLA Success/Fail Counts Chart Gadget Displays success and fail counts of selected SLAs as a stacked bar chart



Available since TTS 5.21.0 for JIRA 6.3 - 6.4.12 or TTS 6.16.0 for JIRA 7.x

Configuration of the gadget similar to the SLA Success/Fail Rates Chart gadget.

  • Project or Saved Filter filters issues
  • SLA(s) select SLA(s) to see as a bar in y-axis
  • Include progressing SLAs? to include SLAs that are not completed yet
  • Custom gadget title is the custom title that will be displayed on top of gadget, if left blank, "TTS - Averaded Working Duration According to SLAs Stacked Bar Chart" will be displayed

REST Services

Time to SLA Plugin provides REST services


Saving SLA definition

MethodPOST
URLBASE_URL/rest/tts-api/latest/sla
Possible responses
{"success":false,"message":"Failed when saving SLA: All fields cannot be empty"}
                                        
-Origin and target dates are custom fields
POST Data
                                    {   
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "slaStartDateField":10900, // date custom field Id 
                                        "slaEndDateField":10901,   // date custom field Id 
                                        "slaValueAsTimeString":"3h",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false
                                    }
Possible Responses
{"success":true,"message":"34"}
                                        
-Origin is date field, target is status
POST Data
                                    {   
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "slaStartDateField":10900, // date custom field Id 
                                        "targetStatusId":[6],
                                        "slaValueAsTimeString":"3h",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false
                                    }
Possible Responses
{"success":true,"message":"46"}
                                        
-With negotiation datetime
POST Data
                                    {   
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "originStatusId":[1],
                                        "targetStatusId":[6],
                                        "slaNegotiationDateIssueFieldKey":"duedate",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false
                                    }
Possible Responses
{"success":true,"message":"58"}
                                        
-With pause status
POST Data
                                    {   
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "originStatusId":[1],
                                        "targetStatusId":[6],
                                        "slaNegotiationDateIssueFieldKey":"duedate",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false,
                                        "pauseSlaArray":[1,5]
                                    }
Possible Responses
{"success":true,"message":"70"}
                                        


Showing SLA definition

MethodGET
URLBASE_URL/rest/tts-api/latest/sla/{slaId}
Possible responses
{  
    "id": 25,
    "description":"Description of the SLA definition",
    "workflowName":"Workflow name",
    "originStatusId":[1],
    "targetStatusId":[6],
    ...
}
                                        

Updating SLA definition

MethodPOST
URLBASE_URL/rest/tts-api/latest/sla
POST Data
                                    {   
                                        "id": 25,    // SLA Id
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "originStatusId":[1],
                                        "targetStatusId":[6],
                                        "slaNegotiationDateIssueFieldKey":"duedate",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false
                                    }
Possible responses
{"success":true,"message":"25"}
                                        
-Updating with pause status
POST Data
                                    {   
                                        "id": 25,    // SLA Id
                                        "description":"Description of the SLA definition",
                                        "workflowName":"Workflow name",
                                        "originStatusId":[1],
                                        "targetStatusId":[6],
                                        "slaNegotiationDateIssueFieldKey":"duedate",
                                        "jqlString":"",
                                        "workingTimeId":-1, // -1 for 7x24, or workingCalendarId
                                        "multipleTransition":true,
                                        "onlyFirstExecution":false,
                                        "pauseSlaArray":[5,100]
                                    }
Possible responses
{"success":false,"message":"Status validation error. [100] no such status."}
                                        


Deleting SLA definition

MethodDELETE
URLBASE_URL/rest/tts-api/latest/sla/{slaId}
{slaId} is the ID parameter of the SLA to be deleted
Possible responses
{"success":true,"message":"Deleted slaId with 25"}
                                        


GET "Time to SLA" field of an issue

MethodGET
URLBASE_URL/rest/tts-api/1.0/sla/timeToSla/{issue-key}.json
Possible responses
{"success":false,"message":"Issue not exists: TTS-313"}
                                        
									[
									     {
									          "slaId": 25,
									          "slaName": "Urgent Fix",
									          "originStatusName": "In Progress",
									          "targetStatusName": "Resolved",
									          "slaValue": 60,
									          "slaValueAsString": "1h",
									          "statusDate": 1431931844500,
									          "targetDate": 1431935444500,
									          "overdue": "(SLA Overdue) 3 hours, 55 minutes, 51 seconds"
									     }
									]


SLA Overview

Lists all SLAs and details (working hours, paused time, ..) for given issue
MethodGET
URLBASE_URL/rest/tts-api/latest/sla/overview/{issue-key}.json
Possible responses
									[
										{
											"timePerformed":1457004154795,
											"workingDuration":"46 minutes, 10 seconds",
											"workingDurationAsSeconds":2770,
											"pausedDuration":"0",
											"slaValueAsTimeString":"20m",
											"status":"EXCEED",
											"breachString":"26 minutes, 10 seconds",
											"originDate":1457004154795,
											"statusDate":1457004154795,
											"expectedTargetDate":1457005354795,
											"actualTargetDate":1431954304511,
											"slaName":"Urgent Handle"
										},
										{
											"timePerformed":1457004154795,
											"workingDuration":"46 minutes, 10 seconds",
											"workingDurationAsSeconds":2770,
											"pausedDuration":"0",
											"slaValueAsTimeString":"1h",
											"status":"STILL",
											"originDate":1457004154795,
											"statusDate":1457004154795,
											"expectedTargetDate":1457007754795,
											"actualTargetDate":1431954357960,
											"slaName":"Urgent Fix"
										}
									]
                                        


Searching SLAs

MethodGET
URLBASE_URL/rest/tts-api/latest/sla/search

Identifiers for search operation
-descriptionExample description=Urgent
-workflowNameExample workflowName=TTS Project Workflow
-priorityIdExample priorityId=1
-originStatusIdExample originStatusId=3
-targetStatusIdExample targetStatusId=5
-slaStartDateFieldExample slaStartDateField=1
-slaEndDateFieldExample slaEndDateField=5
-multipleTransitionExample multipleTransition=true
-onlyFirstExecutionExample onlyFirstExecution=false
-slaValueAsTimeStringExample slaValueAsTimeString=20m
-slaNegotiationDateFieldIdExample slaNegotiationDateFieldId=11000
-slaNegotiationDateIssueFieldKeyExample slaNegotiationDateIssueFieldKey=duedate
-workingTimeIdExample workingTimeId=3
-jqlStringExample jqlString=issuetype = Improvement

Example searches and their responses
URLBASE_URL/rest/tts-api/latest/sla/search
Possible responses
                                        [
                                            {
                                               "id":24,
                                               "description":"Urgent Handle",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[1],
                                               "targetStatusId":[3],
                                               "slaValueAsTimeString":"20m",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":25,
                                               "description":"Urgent Fix",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[3],
                                               "targetStatusId":[5],
                                               "slaValueAsTimeString":"1h",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":28,
                                               "description":"Trivial Finalize",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"5",
                                               "originStatusId":[1],
                                               "targetStatusId":[6],
                                               "slaValueAsTimeString":"1d",
                                               "jqlString":"",
                                               "pauseSlaArray":[
                                                  1
                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":26,
                                               "description":"Normal Resolve",
                                               "workflowName":"TTS Project Workflow",
                                               "originStatusId":[1],
                                               "targetStatusId":[5],
                                               "slaValueAsTimeString":"4h",
                                               "workingTimeId":1,
                                               "jqlString":"priority != Blocker",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }, 
                                            {
                                               "id":30,
                                               "description":"Multiple Status SLA",
                                               "workflowName":"TTS Project Workflow",
                                               "originStatusId":[1,4],
                                               "targetStatusId":[5,6],
                                               "slaValueAsTimeString":"10m",
                                               "jqlString":"issuekey = TP-29",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }
                                        ]
URLBASE_URL/rest/tts-api/latest/sla/search?description=Urgent
Possible responses
                                        [
                                            {
                                               "id":24,
                                               "description":"Urgent Handle",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[1],
                                               "targetStatusId":[3],
                                               "slaValueAsTimeString":"20m",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":25,
                                               "description":"Urgent Fix",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[3],
                                               "targetStatusId":[5],
                                               "slaValueAsTimeString":"1h",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }
                                        ]
URLBASE_URL/rest/tts-api/latest/sla/search?description=Urgent&slaValueAsTimeString=20m
Possible responses
                                        [
                                            {
                                               "id":24,
                                               "description":"Urgent Handle",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[1],
                                               "targetStatusId":[3],
                                               "slaValueAsTimeString":"20m",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }
                                        ]


List all SLAs

MethodGET
URLBASE_URL/rest/tts-api/1.0/sla/allSlas.json
Possible responses
                                        [
                                            {
                                               "id":24,
                                               "description":"Urgent Handle",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[1],
                                               "targetStatusId":[3],
                                               "slaValueAsTimeString":"20m",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":25,
                                               "description":"Urgent Fix",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"1",
                                               "originStatusId":[3],
                                               "targetStatusId":[5],
                                               "slaValueAsTimeString":"1h",
                                               "jqlString":"",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":28,
                                               "description":"Trivial Finalize",
                                               "workflowName":"TTS Project Workflow",
                                               "priorityId":"5",
                                               "originStatusId":[1],
                                               "targetStatusId":[6],
                                               "slaValueAsTimeString":"1d",
                                               "jqlString":"",
                                               "pauseSlaArray":[
                                                  1
                                               ],
                                               "empty":false
                                            },
                                            {
                                               "id":26,
                                               "description":"Normal Resolve",
                                               "workflowName":"TTS Project Workflow",
                                               "originStatusId":[1],
                                               "targetStatusId":[5],
                                               "slaValueAsTimeString":"4h",
                                               "workingTimeId":1,
                                               "jqlString":"priority != Blocker",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }, 
                                            {
                                               "id":30,
                                               "description":"Multiple Status SLA",
                                               "workflowName":"TTS Project Workflow",
                                               "originStatusId":[1,4],
                                               "targetStatusId":[5,6],
                                               "slaValueAsTimeString":"10m",
                                               "jqlString":"issuekey = TP-29",
                                               "pauseSlaArray":[

                                               ],
                                               "empty":false
                                            }
                                        ]


Generate SLA Data for existing issue

MethodGET
URLBASE_URL/rest/tts-api/1.0/sla/regenerate/{issue-key}
Possible responses
									{"success":false,"message":"Issue not exists: TTS-313"}
									{"success":false,"message":"Unauthorized user"}
									{"success":true,"message":""}
                                        


Reset SLA

MethodPOST
URLBASE_URL/rest/tts-api/1.0/sla/reset/{issue-id}/{sla-id}
{issue-id} required parameter where {sla-id} is optional. If {sla-id} is not provided, than all SLAs for the issue will be reset
POST parameter{"date":timeAsMillis} (as long, time millis, optional, if not set current time will be used)
Possible responses
									{"success":true,"message":""}
									{"success":true,"message":"There are no generated SLA data for issue: TTS-313"}
									{"success":false,"message":"Unauthorized user"}
									{"success":false,"message":"Issue not exists: TTS-313"}
                                        

Save/update calendar

MethodPOST
URLBASE_URL/rest/tts-api/latest/calendar
POST data
                       				{
									  "calendarId": "0",
									  "calendarName": "calName",
									  "days": [
									    {"weekday": "monday",   "enabled": true, "startHour": 9, "startMinute": 0, "endHour": 18, "endMinute": 0},
									    {"weekday": "tuesday",  "enabled": true, "startHour": 9, "startMinute": 0, "endHour": 18, "endMinute": 0},
									    {"weekday": "wednesday","enabled": true, "startHour": 9, "startMinute": 0, "endHour": 18, "endMinute": 0},
									    {"weekday": "thursday", "enabled": true, "startHour": 9, "startMinute": 0, "endHour": 18, "endMinute": 0},
									    {"weekday": "friday",   "enabled": true, "startHour": 9, "startMinute": 0, "endHour": 18, "endMinute": 0},
									    {"weekday": "saturday", "enabled": false,"startHour": 0, "startMinute": 0, "endHour": 0,  "endMinute": 0},
									    {"weekday": "sunday",   "enabled": false,"startHour": 0, "startMinute": 0, "endHour": 0,  "endMinute": 0}
									  ]
									}
                                        
Possible responses
									{"success":true,"message":"id of the calendar"}  
									{"success":false,"message":"Calendar name cannot be empty!"}
									{"success":false,"message":"At least one day should be enabled in the calendar!"}
                                        

Delete calendar

MethodDELETE
URLBASE_URL/rest/tts-api/latest/calendar/{id}
{id} is the ID parameter of the calendar to be deleted
Possible responses
									{"success":true,"message":""}  
                                        

Add/update non-working day

MethodPOST
URLBASE_URL/rest/tts-api/latest/calendar/nonworkingday/
POST data
                       				{"calendarId":7, "description": "Independence day", "day": "2016-07-04"}
                       				// fill {id} parameter if you want to update existing
                       				{"id": 8, "calendarId":7, "description": "Independence day", "day": "2016-07-04"}
                       				// use "-1" for calendarId to add a shared non-working day
                                        
Possible responses
									{"success":true,"message":"","code":8} //{code} is the id of saved non-working day 
									{"success":false,"message":"Date cannot be empty","code":0}
									{"success":false,"message":"Date should ne in yyyy-MM-dd format, got [12 May 2016]","code":0}
                                        

Delete nonworking day

MethodDELETE
URLBASE_URL/rest/tts-api/latest/calendar/nonworkingday/{id}
Possible responses
									{"success":true,"message":""} 
                                        

Groovy Scripts for TTS Fields

In this section, you can find Groovy scripts to get TTS custom fields' detail info.
If you're using Script Runner Plugin, you can easily use these code snippets to get data.

  • Script for Time to SLA Customfield
    								import com.atlassian.jira.component.ComponentAccessor
    								import com.atlassian.jira.issue.CustomFieldManager
    								import com.atlassian.jira.issue.MutableIssue
    								import com.atlassian.jira.issue.customfields.CustomFieldType
    								import com.atlassian.jira.issue.fields.CustomField
    								import java.util.*
    								import java.text.SimpleDateFormat
    								import java.sql.Timestamp
    								
    								// get CustomFieldManager instance
    								def customFieldManager = ComponentAccessor.getCustomFieldManager()
    								// find your TTS custom field's ID and put it here instead of 10600
    								def ttsField = customFieldManager.getCustomFieldObject("customfield_10600") 
    								// get custom field value object 
    								def ttsFieldValue = issue.getCustomFieldValue(ttsField)
    								// date/time formatter will be used to format date attributes
    								def formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss")
    								// all attributes will be stored to result variable 
    								def result = ""
    								// TTS custom field returns list, let's iterate
    								if (ttsFieldValue && ttsFieldValue.size() > 0) {
    								   ttsFieldValue.each {
    								       String slaName = it.slaName
    								       int slaValueAsMinutes = it.slaValue
    								       String slaValueAsTimeString = it.slaValueAsString
    								       String originStatusName = it.originStatusName
    								       String targetStatusName = it.targetStatusName
    								       Date originDate = it.statusDate
    								       Date expectedTargetDate = it.slaTargetDate
    								       Date actualTargetDate = it.untilDate
    								       long timeLeftTillSla = it.timeToSla // if less than 0, overdue
    								       String timeLeftTillSlaAsTimeString = it.timeToSlaAsString // if there is overdue, overdue string
    								       boolean isPaused = it.paused
    								       boolean startDateProvidedByDateCustomField = it.startDateProvidedByDateCustomField
    								       boolean endDateProvidedByDateCustomField = it.endDateProvidedByDateCustomField
    								       boolean negotiationDateProvidedByDateCustomField = it.negotiationDateProvidedByDateCustomField
    								
    								       result = """
    								          [SLA Name: $slaName]
    								          [SLA Value As Minutes: $slaValueAsMinutes]
    								          [SLA Value As Time String: $slaValueAsTimeString]
    								          [Origin Status: $originStatusName]
    								          [Target Status: $targetStatusName]
    								          [Origin Date: ${formatter.format(originDate)}]
    								          [Expected Target Date: ${expectedTargetDate ? formatter.format(expectedTargetDate) : 'Not yet defined'}]
    								          [Actual Target Date: ${actualTargetDate ? formatter.format(actualTargetDate) : 'Not yet'}]
    								          [Time Left Till SLA as milis: $timeLeftTillSla]
    								          [Time Left Till SLA as Time String: $timeLeftTillSlaAsTimeString]
    								          [Is SLA in Paused Status: $isPaused]
    								          [Is Start Date Provided By Date Custom Field: $startDateProvidedByDateCustomField]
    								          [Is End Date Provided By Date Custom Field: $endDateProvidedByDateCustomField]
    								          [Is Negotiation Date Provided By Date Custom Field: $negotiationDateProvidedByDateCustomField]
    								          
    """ } } result.toString()
    Sample result:
    							[SLA Name: Sla to Resolution] 
    							[SLA Value As Minutes: 240] 
    							[SLA Value As Time String: 4h] 
    							[Origin Status: Open] 
    							[Target Status: Resolved] 
    							[Origin Date: 06/13/2016 09:33:30] 
    							[Expected Target Date: 06/13/2016 13:33:30] 
    							[Actual Target Date: Not yet] 
    							[Time Left Till SLA as milis: -34676000] 
    							[Time Left Till SLA as Time String: - 9 hours, 37 minutes, 56 seconds] 
    							[Is SLA in Paused Status: false] 
    							[Is Start Date Provided By Date Custom Field: false] 
    							[Is End Date Provided By Date Custom Field: false] 
    							[Is Negotiation Date Provided By Date Custom Field: false]
                                        
  • Script for SLA Overview Customfield
                        			import com.atlassian.jira.component.ComponentAccessor
    								import com.atlassian.jira.issue.CustomFieldManager
    								import com.atlassian.jira.issue.MutableIssue
    								import com.atlassian.jira.issue.customfields.CustomFieldType
    								import com.atlassian.jira.issue.fields.CustomField
    								import java.util.*
    								import java.text.SimpleDateFormat
    								import java.sql.Timestamp
    								
    								// get CustomFieldManager instance
    								def customFieldManager = ComponentAccessor.getCustomFieldManager()
    								// find your SLA Overview field's ID and put it here instead of 10801
    								def overviewField = customFieldManager.getCustomFieldObject("customfield_10801")
    								def overviewFieldValue = issue.getCustomFieldValue(overviewField)
    								// date/time formatter will be used to format date attributes
    								def formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss")
    								def returnString = ""
    								// SLA Overview field returns list
    								if (overviewFieldValue && overviewFieldValue.size() > 0) {
    								    // if there is overdue, then all details of overdues are in 'overdues' attribute
    								        overviewFieldValue.each {
    								            String slaName = it.sla.description
    								            int slaValueAsMinutes = it.sla.slaValue
    								            String slaValueAsTimeString = it.slaValueAsTimeString
    								            Date originDate = it.originDate
    								            Date expectedTargetDate = it.expectedTargetDate
    								            Date actualTargetDate = it.actualTargetDate
    								            String workingDurationAsTimeString = it.workingDuration
    								            long workingDurationAsSeconds = it.workingDurationAsSeconds
    								            String pausedDurationAsTimeString = it.pausedDuration
    								            // if there is overdue
    								            String overdueString = it.breachString
    								            int originStatusId = it.sla.originStatusId
    								            int targetStatusId = it.sla.targetStatusId
    								            boolean negotiationDateProvidedByCustomField = it.negotiationDateProvidedByCustomField
    								
    								       returnString += """
    								              [SLA Name: $slaName]
    								              [SLA Value As Minutes: $slaValueAsMinutes]
    								              [SLA Value As Time String: $slaValueAsTimeString]
    								            [Origin Date: ${formatter.format(originDate)}]
    								            [Expected Target Date: ${expectedTargetDate ? formatter.format(expectedTargetDate) : 'Not yet defined'}]
    								              [Actual Target Date: ${actualTargetDate ? formatter.format(actualTargetDate) : 'Not yet'}]
    								            [Working Duration: $workingDurationAsTimeString]
    								            [Working Duration As Seconds: $workingDurationAsSeconds]
    								            [Paused Duration: $pausedDurationAsTimeString]
    								            [Overdue: $overdueString]
    								            [Origin Status Id: $originStatusId]
    								            [Target Status Id: $targetStatusId]
    								            [Is Negotiation Date Provided By Custom Field: $negotiationDateProvidedByCustomField]
    								            
    """ } } returnString.toString()
    Sample result:
                        			[SLA Name: Sla to Resolution] 
    								[SLA Value As Minutes: 240] 
    								[SLA Value As Time String: 4h] 
    								[Origin Date: 06/13/2016 09:33:30] 
    								[Expected Target Date: 06/13/2016 13:33:30] 
    								[Actual Target Date: Not yet] 
    								[Working Duration: 8 hours, 23 minutes, 16 seconds] 
    								[Working Duration As Seconds: 51796] 
    								[Paused Duration: 0] 
    								[Overdue: 4 hours, 23 minutes, 16 seconds] 
    								[Origin Status Id: 49] 
    								[Target Status Id: 53] 
    								[Is Negotiation Date Provided By Custom Field: false]
    								
                        			[SLA Name: Trivial Sla] 
                        			[SLA Value As Minutes: 1440] 
                        			[SLA Value As Time String: 1d] 
                        			[Origin Date: 06/13/2016 09:33:30] 
                        			[Expected Target Date: 06/14/2016 23:54:28] 
                        			[Actual Target Date: Not yet] 
                        			[Working Duration: 10 minutes] 
                        			[Working Duration As Seconds: 600] 
                        			[Paused Duration: 1 hour, 13 minutes, 16 seconds] 
                        			[Overdue: null] 
                        			[Origin Status Id: 49] 
                        			[Target Status Id: 54] 
                        			[Is Negotiation Date Provided By Custom Field: false]
                                        
  • Script for Overdue Customfield
                        			import com.atlassian.jira.component.ComponentAccessor
    								import com.atlassian.jira.issue.CustomFieldManager
    								import com.atlassian.jira.issue.MutableIssue
    								import com.atlassian.jira.issue.customfields.CustomFieldType
    								import com.atlassian.jira.issue.fields.CustomField
    								import java.util.*
    								import java.text.SimpleDateFormat
    								import java.sql.Timestamp
    								
    								def customFieldManager = ComponentAccessor.getCustomFieldManager()
    								// find your Overdue Status custom field's ID and put it here instead of 10601
    								def overdueField = customFieldManager.getCustomFieldObject("customfield_10601")
    								def overdueFieldValue = issue.getCustomFieldValue(overdueField)
    								def formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss")
    								def result = ""
    								// overdue field returns list
    								if (overdueFieldValue && overdueFieldValue.size() > 0) {
    								    overdueFieldValue.each {
    								        String slaName = it.description
    								        int slaValueAsMinutes = it.slaValue
    								        String slaValueAsTimeString = it.slaValueAsString
    								        String originStatusName = it.beforeState
    								        String targetStatusName = it.afterState
    								        Date originDate = it.beforeDate
    								        Date expectedTargetDate = it.expectedTargetDate
    								        Date actualTargetDate = it.afterDate
    								        long workingTimeAsMillis = it.workingTimeAsMillis
    								        String overdue = it.overdue
    								        boolean startDateProvidedByDateCustomField = it.startDateProvidedByDateCustomField
    								        boolean endDateProvidedByDateCustomField = it.endDateProvidedByDateCustomField
    								        boolean negotiationDateProvidedByDateCustomField = it.negotiationDateProvidedByDateCustomField
    								
    								        result = """
    								            [SLA Name: $slaName]
    								            [SLA Value As Minutes: $slaValueAsMinutes]
    								            [SLA Value As Time String: $slaValueAsTimeString]
    								            [Origin Status: $originStatusName]
    								            [Target Status: $targetStatusName]
    								            [Origin Date: ${formatter.format(originDate)}]
    								            [Expected Target Date: ${expectedTargetDate ? formatter.format(expectedTargetDate) : 'Not yet defined'}]
    								            [Actual Target Date: ${actualTargetDate ? formatter.format(actualTargetDate) : 'Not yet'}]
    								            [Overdue: ${overdue}]
    								            [Is Start Date Provided By Date Custom Field: $startDateProvidedByDateCustomField]
    								            [Is End Date Provided By Date Custom Field: $endDateProvidedByDateCustomField]
    								            [Is Negotiation Date Provided By Date Custom Field: $negotiationDateProvidedByDateCustomField]
    								             
    """ } } result.toString()
    Sample result:
                        			[SLA Name: Sla ro Resolution] 
                        			[SLA Value As Minutes: 240] 
                        			[SLA Value As Time String: 4h] 
                        			[Origin Status: Open] 
                        			[Target Status: Resolved] 
                        			[Origin Date: 06/13/2016 12:27:32] 
                        			[Expected Target Date: 06/13/2016 16:27:32] 
                        			[Actual Target Date: 06/13/2016 18:28:49] 
                        			[Overdue: 2 hours, 1 minute, 17 seconds] 
                        			[Is Start Date Provided By Date Custom Field: false] 
                        			[Is End Date Provided By Date Custom Field: false] 
                        			[Is Negotiation Date Provided By Date Custom Field: false]
                                        
  • Script for SLA Indicator Customfield
                        			import com.atlassian.jira.component.ComponentAccessor
    								import com.atlassian.jira.issue.CustomFieldManager
    								import com.atlassian.jira.issue.MutableIssue
    								import com.atlassian.jira.issue.customfields.CustomFieldType
    								import com.atlassian.jira.issue.fields.CustomField
    								import java.util.*
    								import java.text.SimpleDateFormat
    								import java.sql.Timestamp
    								
    								def customFieldManager = ComponentAccessor.getCustomFieldManager()
    								// find your SLA Indicator field's ID and put it here instead of 10700
    								def indicatorField = customFieldManager.getCustomFieldObject("customfield_10700")
    								def indicatorFieldValue = issue.getCustomFieldValue(indicatorField)
    								def formatter = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss")
    								def returnString = ""
    								// SLA Indicator field returns an object
    								if (indicatorFieldValue) {
    								    String result = indicatorFieldValue.result
    								
    								    // if there is overdue, then all details of overdues are in 'overdues' attribute
    								    def overdues = indicatorFieldValue.overdues
    								    if (overdues.size() > 0) {
    								        overdues.each {
    								            def overdue = it.value
    								            String slaName = overdue.sla.description
    								            int slaValueAsMinutes = overdue.sla.slaValue
    								            String slaValueAsTimeString = overdue.slaValueAsTimeString
    								            Date originDate = overdue.originDate
    								            Date expectedTargetDate = overdue.expectedTargetDate
    								            Date actualTargetDate = overdue.actualTargetDate
    								            String workingDurationAsTimeString = overdue.workingDuration
    								            long workingDurationAsSeconds = overdue.workingDurationAsSeconds
    								            String pausedDurationAsTimeString = overdue.pausedDuration
    								            String overdueString = overdue.breachString
    								            int originStatusId = overdue.sla.originStatusId
    								            int targetStatusId = overdue.sla.targetStatusId
    								            boolean negotiationDateProvidedByCustomField = overdue.negotiationDateProvidedByCustomField
    								
    								       returnString = """
    								              [SLA Name: $slaName]
    								              [SLA Value As Minutes: $slaValueAsMinutes]
    								              [SLA Value As Time String: $slaValueAsTimeString]
    								            [Origin Date: ${formatter.format(originDate)}]
    								            [Expected Target Date: ${expectedTargetDate ? formatter.format(expectedTargetDate) : 'Not yet defined'}]
    								              [Actual Target Date: ${actualTargetDate ? formatter.format(actualTargetDate) : 'Not yet'}]
    								            [Working Duration: $workingDurationAsTimeString]
    								            [Working Duration As Seconds: $workingDurationAsSeconds]
    								            [Paused Duration: $pausedDurationAsTimeString]
    								            [Overdue: $overdueString]
    								            [Origin Status Id: $originStatusId]
    								            [Target Status Id: $targetStatusId]
    								            [Is Negotiation Date Provided By Custom Field: $negotiationDateProvidedByCustomField]
    								            
    """ } } } returnString.toString()
    Sample result:
                        			[SLA Name: Sla to Resolution] 
                        			[SLA Value As Minutes: 240] 
                        			[SLA Value As Time String: 4h] 
                        			[Origin Date: 06/13/2016 09:33:30] 
                        			[Expected Target Date: 06/13/2016 13:33:30] 
                        			[Actual Target Date: Not yet] 
                        			[Working Duration: 14 hours, 3 minutes, 10 seconds] 
                        			[Working Duration As Seconds: 50590] 
                        			[Paused Duration: 0] 
                        			[Overdue: 10 hours, 3 minutes, 10 seconds] 
                        			[Origin Status Id: 49] 
                        			[Target Status Id: 53] 
                        			[Is Negotiation Date Provided By Custom Field: false]