Set the due date of Request item as sla duration

Kusuma2
Kilo Guru

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.

find_real_file.png

I want to set the duration of sla same as the due date field value.

REGARDS.

Ajay.

7 REPLIES 7

Uncle Rob
Kilo Patron

Did you try this set up?


find_real_file.png


Yes Robert I done with thatt setting..still i see



\find_real_file.png


Jaspal Singh
Mega Patron
Mega Patron

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();


}


//}


Hi Jaspal,



I have written the same script but it is not working.


find_real_file.png


I am not sure about the when to run conditions please can you please suggest what are the start condtions in my case.