- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-12-2015 07:00 AM
I have a request to update the Planned End Time on the SLA when the Due Date on the Case (aka Task) changes. Authorized users are able to update the Due Date.
(Background - if the due date on a case is extended, then the SLA may breach because the planned end time does not update.)
I was able to location a HI article which suggested a solution:
- add a reset condition of Active = True and Due Date changes
- add a custom Duration Type with the following script
// Perform relative duration calculation using the 'calculator' variable (which is a DurationCalculator object)
var endDateTime;
if (current.getRecordClassName() == 'task_sla') {
endDateTime = current.task.due_date;
} else {
endDateTime = current.due_date;
}
calculator.calcScheduleDuration(calculator.startDateTime, endDateTime);
Article link: https://hi.service-now.com/kb_view_customer.do?sysparm_article=KB0536464&sysparm_topic=Known+Error+D...
What I'm seeing now is the exact problem that this HI article was designed to fix - the start and end date/times are being set to the same time:
Interestingly, if the due date is actually overridden, the original SLA (as seen above) is completed and the new one shows correct start and end times:
Since I can't assume that a due date WILL be overriden, I need to find a way to correctly create the original SLA.
On a related thread: SLA Status on Reset - Complete vs. Cancelled I also need a way to identify the completed SLA so that it can be excluded from reporting.
Thanks in advance for suggestions and help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2015 11:22 AM
Replying back to provide our final solution. Hopefully someone else will find this helpful. Here's what I ended up doing to solve this issue and fulfill the request.
Original Request
When the Due Date is overridden on the CASE table (extended from Task), the Resolution SLA should reflect the new Due Date as the Planned End Date. The Resolution SLA should not breach until the Due Date is reached.
Solution
- added Relative Duration "Based on Due Date" which calculates Planned End Time / timings on SLA based on the Due Date on the Case. (uses code listed in original post, above.)
- added Business Rule "Set Due Date Override flag" to set Due Date Override flag to 'true' when the Due Date field changes. (Due Date Override can't be made a dependent field of Due Date - that option is only available to Choice and Reference fields and Due Date Override is a true/false field.)
- updated all existing Resolution SLAs to add a new start condition of "Due Date Override = false": (see attachment)
- created new "Case Resolution - Due Date / Résolution de dossier - Modification d'échéance" SLA to:
- start when Due Date Override is true & case is open
- stop when case is closed
- duration type is "Based on Due Date"
- copied existing task sla cleanup business rule to "Task SLA Cleanup - Due Date" which will delete any in-progress resolution SLAs when the due date changes.
Notes
- SLAs not driven off a user-specified duration do not have a Pause condition. It's not applicable)
- A Reset condition of <field> CHANGES causes the original SLA to complete, leading to duplicate completed SLAs which can be an issue for reporting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 05:11 AM
Hey Sue,
Can you help me with the business rule to set due date override to true.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 05:44 AM
Hi Varun,
That rule is part of our custom application. What's your question?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 06:22 AM
Hey Sue,
Mine is similar to your application wherein if due date of catalog tasks changes, it should also update the planned end time of task_Sla attached to it.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-20-2017 07:18 AM
Then you probably want to use a field like Due Date Override T/F to be the trigger for the SLA.
For example, I have an SLA of three days for a Policy Change task. However, if the Due Date is overridden, then the SLA should breach on the Due Date.
To accomplish this, I have a flag (Due Date Override) that is set when the Due Date is changed - that's the business rule.
I have two SLAs - one that runs when there is NO override (start condition of Due Date Override = false), and one that runs where there IS an override (start condition of Due Date Override = true).
Only one of these SLAs will ever run on a record. The other would get cancelled.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-06-2025 01:29 PM
Great idea, I had a similar problem, this workaround seems like a good solution that will help me, thank you very much