Attaching SLA to incidents where it is not attached

Anurag28
Kilo Contributor

Hi All,

 

We have some incidents where the SLA definitions did not attach and hence due date is not calculated. The requirement is to run a script(background script/schedule job) to attach SLA based on the priority,e.g:- if Priyority is p4, 'P4 SLA Resolution' SLA should attach.

 

till now I have got the following script-

var ag = new GlideRecord('incident');
var a ;
ag.addEncodedQuery('u_due_dateISEMPTY');
ag.query();
while(ag.next()){
a = ag.priority;
if(a == 'p5'){
gs.print('p5');
}}

 

But I am not quite sure how to attach the SLA definitions from task_sla table in this script. Any help is appreciated. Thanks.

5 REPLIES 5

Hi,

Can you post SLA definition configured for incidents along with start/pause and stop condition?

 

The task sla creation is a basic functionality of SLA definition where system automatically start, pause or stop SLA conditions for all the tables created under task table