This widget could not be displayed.
This widget could not be displayed.

Starting RITM SLA based on first catalog task creation

Mathieu Van de
Tera Contributor

Hi All,

 

I need my RITM SLA to start when first catalog task will be created because this task will only be created 3 days before a specific date from a variable (this date is entered by the requestor in the Service Portal)

 

On my sla if i set the following start condition, is it going to work ? : 

 

If item is "the catalog item concerned"

AND

Requested_item.Parent_task.active IS true (so I mean if there is an active task for this catalog item, then the SLA should start)

 

Thanks in advance

 

KR,

2 REPLIES 2

Its_Azar
Kilo Sage

Hi there @Mathieu Van de  

I dont think this is not a right way to start an SLA on the RITM

Start SLA when first catalog task exists

Use a start condition that checks for at least one task.

Example SLA start condition (script):

var taskGR = new GlideRecord('sc_task');
taskGR.addQuery('request_item', current.sys_id);
taskGR.setLimit(1);
taskGR.query();
answer = taskGR.hasNext();

 

☑️ If this helped, please mark it as Helpful or Accept Solution so others can find the answer too.

Kind Regards,
Azar
Serivenow Rising Star
Developer @ KPMG.

Brian Lancaster
Kilo Patron

You say you want a RITM SLA but it sound like you are using the sc_task table as request_item is not a field on the sc_req_item table. I'm not sure this would be possible unless you create a field on the sc_req_item table that gets set to true when the first task is generated. Then you could put a conditions of something like First Task is true.