SLA Clock refresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 06:26 AM
Hi,
On our incident form we have a field u_remaining_sla_time (screenshot below). This field is update by a business rule which runs on insert and update and just takes the current.business_time_left and populates it in this field.
We have the issue though that we need this field to refresh at regular intervals without going into the log.
Our managers want to be able to see from list view an accurate remaining SLA time.
I have seen that SLA refresh is controlled by the following scheduled jobs:
- SLA update (breach after 30 days): repeats every 5 days
- SLA update (breach within 1 day): repeats every hour
- SLA update (breach within 1 hour): repeats every 10 minutes
- SLA update (breach within 10 min): repeats every 1 minute
- SLA update (breach within 30 days): repeats every day
- SLA update (already breached): repeats every day
However I cannot seem to find in the system where these are held (I've looked under system definitions > Scheduled Jobs), can anyone help?
Also what would be the best solution so that from list view we can see the remaining SLA time and this is refreshed say every 30 mins?
Any help is greatly appreciated.
- Labels:
-
Incident Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-28-2017 03:42 PM
Have you tried setting the glide.sla.calculate_on_display property to update whenever the task is viewed?
Otherwise there is an esoteric internal algorithm that decides when to update.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2017 03:15 AM
Hi Joe,
This is already set to true
We have the following business rule which is used to populate the u_remaining_sla_time filed
We are currently having to go into each log and go to the running clock and click refresh for the u_remaining_sla_time to update.
Ideally what we want is for this field to update on a regular basis e.g. every 30 or 1hour etc
This would then allow our managers to view this field from list view and get an accurate idea of the remaining SLA without having to go into each individual log.
Any help/advise on what we need to change to achieve this will be greatly appreciated.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2017 04:36 AM
Looks like the SLA engine doesn't trigger rules on recalculations, just insert. You can setup a scheduled job on 30 minute/1 hour intervals (depending on requirements and performance) using:
var sla = new GlideRecord('task_sla');
sla.addQuery('stage', 'in_progress');
sla.addQuery('task.sys_class_name', 'incident');
sla.query();
while (sla.next()) {
if (!sla.end_time.nil())
SLACalculatorNG.calculateSLA(sla, /* skipUpdate */ false, sla.end_time);
else
SLACalculatorNG.calculateSLA(sla, /* skupUpdate */ false);
var inc = new GlideRecord('incident');
if (inc.get(sla.task)){
inc.u_remaining_sla_time = sla.business_time_left;
inc.setWorkflow(false); //Maybe you want to turn off business rules
inc.update();
}
}
This worked on my instance.