Set the due date of Request item as sla duration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 08:17 AM
Hi Team,
I want to set the due on the Request item as sla duration.
Here my due date field is populating from the variable via the workflow it is working fine.
Gone through all the link:
Re: Set SLA based on a Task's Due Date
updating due date when the SLA is tagged in problem
Set up an SLA for a Task's Due Date
I followed all these links in community and followed the suggestions:
1. Created a Relative Duration
2.Called this Relative Duration script in the Sla .
As a response of it the actual elapsed time of sla is showing the due date but the sla breach is showing as 2 min.
Please find the attached screen shot.
I want to set the duration of sla same as the due date field value.
REGARDS.
Ajay.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 08:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 08:31 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 08:27 AM
Hi Ajay,
Kindly get an after business rule created on task_sla table with below code.
//function onAfter(current, previous) { //Kindly keep the function commented
var gr = new GlideRecord('incident');
gr.addQuery('sys_id',current.task);
gr.query();
while(gr.next())
{
gs.log('Task is ',current.task.getDisplayValue());
gs.log('Due date is ',current.planned_end_time);
gr.due_date = current.planned_end_time;
gr.setWorkflow(false);
gr.update();
}
//}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-20-2017 08:56 AM