SLA tasks being created before record producer script

M_iA
Kilo Sage

We have a very simple record producer with the following in the RP script:

current.company = producer.account;
current.contact = producer.contact;
current.u_area='b6c35703db3eaf4065eed06b689619f8';
current.category= producer.u_category;
current.subcategory = producer.u_subcategory;
current.impact = producer.Impact2;
current.urgency = producer.Urgency2;
current.assignment_group = 'e4a77ccadb8ab7809d5f9334ca961996';//SN-Dedicated Support T2
current.contact_type = 'csm';
current.u_created_by_rp = "96c9573e1b09bb00dc5aca217e4bcbdd";

 

For this RP, i have a very simple SLA. The condition being:

M_iA_0-1691669030139.png

However, it seems the SLA task is being created before the record producer script populates the "Area" field. Therefore, no SLA is created. If I then click to repair SLA, the SLA is then created.

 

Any ideas on why this is happening?

 

1 ACCEPTED SOLUTION

After turning on this logging, I found the issue.

 

One of my devs had created an incomplete BR that on insert, it was defaulting the area field, before the RP script then set the field. So when TASK SLA was created, it was reading the value set by the BR!

 

BR sorted and SLAs work as expected

View solution in original post

4 REPLIES 4

Anil Lande
Kilo Patron

Hi,

Have you tried setting priority using your Record Producer script along with Impact and Urgency?

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande

Priority is dictated by the impact and urgency so doesnt need to be set individually. I have tried removing priorty from the condition, but SLAs still isnt created.

M_iA
Kilo Sage

If I turn on logging, I can see 2 entries triggered at the same time:

2023-08-10 14:54:10.620 [DEBUG] _checkNewSLA: checking CS - Darwin P3 - Resolution, start condition matched=false

and

M_iA_0-1691675975013.png

 

 

After turning on this logging, I found the issue.

 

One of my devs had created an incomplete BR that on insert, it was defaulting the area field, before the RP script then set the field. So when TASK SLA was created, it was reading the value set by the BR!

 

BR sorted and SLAs work as expected