Where is the logic written for Actual elapsed time duration field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2019 09:37 AM
Hi all,
I need to create a custom duration field on Incident form to show the difference between the Created and Current date/time until it is Resolved. Its something similar to Actual elapsed time field on task_sla table.
Can somebody help me on this.
Thanks in advance,
Savitha
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2019 09:59 AM
Hi Savitha
Actual and business elapsed times
- Actual elapsed values are calculated on a 24x7 basis.
- Business elapsed values are calculated based on the schedule specified in the task SLA. The schedule is taken from the SLA definition by default.
Note: If no schedule is specified, then the Business elapsed time is the same as the Actual elapsed time. This can be disabled by changing the com.snc.sla.always_populate_business_fields property to false in the SLA Engine. When this property is set to false, the Business fields will be 0 or empty.
Elapsed times and schedules
Consider a scenario where an SLA has a defined schedule of 9 am to 5 pm on weekdays. With this schedule, the difference between actual and business elapsed times can be significant.For example, if a task SLA starts at 2 pm on a weekday, its business elapsed time at 9 am on the next weekday is 3 hours while its actual elapsed time is 19 hours.Business elapsed time vs actual elapsed time

Example
For example, an incident is opened on Friday, December 12 at 9 pm, outside of the SLA schedule of 8 am to 5 pm on weekdays.If the current time is the following Monday at 9:30 am, then:- Business elapsed time is 1 hour and 30 minutes because the SLA business timer stopped at 5 pm on Friday and restarted at 8 am on Monday.
- Actual elapsed time is 60 hours and 30 minutes, representing the real time between the incident being opened and the current time.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2019 10:13 AM
Hi Savitha,
SLACalculatorNG is the script include responsible for updating all the Task SLA records. In addition, this script include is used in Scheduled jobs that update SLA after regular intervals. Scheduled jobs as below can be located from System Scheduler >> Scheduled Jobs & are responsible for updating Task SLA (Actual, Business Elapsed time, etc.) records after regular intervals.
- 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
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-19-2019 11:03 AM
Hi Savitha,
If you got what was expected you can mark this thread & close so that it does not appear in uananswered list.
Thanks,
Jaspal Singh
Hit Helpful or Correct on the impact of response.