Actual elapsed time, percentage, business elapsed time and percentage issue

vimal909
Mega Contributor

Hi,

I have created SLA for my Service Catalogs. For these Catalogs I want the SLA to run once the Catalog Approved so that it takes Start time as Service Catalog approved time. So I have not selected Retroactive Start. But the issue is the Actual elapsed time, percentage, business elapsed time and percentage fields are not running live i.e, only if the state of the Service Catalog is in "Awaiting user info" or "Closed" it is showing elapsed time and percentage.

find_real_file.png

I want to these fields to run and show upto date. Any solution?

Thanks,

Vimal

1 ACCEPTED SOLUTION

Michael Fry1
Kilo Patron

Elapsed time & elapsed percentage updated according to schedule below:


2.4.2 Scheduled Jobs

ServiceNow recalculates SLAs based on when they are breached, using these scheduled jobs on the Schedule Item [sys_trigger] table.


  • SLA update (already breached): repeats every day
  • 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

Your screen shot shows Business elapsed time and business elapsed percentage. They will only populate if your SLA has a schedule other than 24x7. So 8x5 schedule would cause those fields to populate. Otherwise, they are blank as their isn't anything to calculate.


View solution in original post

12 REPLIES 12

I am using a schedule to calculate the due_date on the task:



http://i.imgur.com/0uhi2K1.png


Your duration field doesn't look correct.


I am using the following Relative Duration, which was shared on this community board and has been used by others (for a task's "due_date" field):



var baseTable = new TableUtils(current.getRecordClassName()).getAbsoluteBase();  


if (baseTable == 'task')  


    myTask = current;  


else if (baseTable == 'task_sla')  


    myTask = current.task;  


 


var dueBy = myTask.due_date.getGlideObject(); // due_date - a glide_date_time field on our associated Task record  


 


calculator.endDateTime = dueBy;  


calculator.seconds = ((dueBy.getNumericValue() - calculator.startDateTime.getNumericValue()) / 1000);  


calculator.totalSeconds = calculator.seconds;  



..



With it calculating an endDateTime, I figured it would be able to calculation business elapsed percentage.


Good day,



I have been testing out the above script, and continue to have issues with getting a relative duration. Checking the SLA logs, the duration is returning a "NaN" result, and due to this the Business Relative Duration is also returning "NaN".


nick702
Mega Contributor

I am also having this issue.



I have a schedule set with 2 SLAs to trigger. If I use Retroactive on Created, then it works like a charm, however, I only want the SLA clock along with the 'business time left' and 'business elapsed' time to begin once the incident gets assigned to a specific assignment group.



I tried to change retro off, but there is no business calculation, then i tried to set to retro, as 'updated' to start, however, the time does not show a live calculation???



Once I achieve the SLA though, it updates and provides the calculation.



*I would like to point out though, that the email notice still goes out as it should. Only the calculation is not working.



I have a screenshot of the issue showing the start time of the SLA...and I check current time and no calculation is there.


find_real_file.png