Once Parent Incident Status Changes, Child Ticket Status Should Change automatically for all the states

SNOW46
Tera Contributor

Hello All,

We are getting a conflict in our current scenario as whenever the Parent Incident Status changes to OnHold and On-hold reason is any one of the reasons from the drop-down, the corresponding Child Incident Status is not getting automatically changed to OnHold. Because of this, the SLA is getting breached in our Child Incidents which is very critical.

 

Can anyone let me know how to fix this asap?

Thanks

15 REPLIES 15

Valmik Patil1
Kilo Sage

Hi,

Write after update business rule on incident table, use below script

var incident = new GlideRecord('incident');
incident.addQuery('parent', current.sys_id);
incident.query();
while(incident.next()){

incident.state = current.state;

incident.update();

}

Please mark my answer correct and helpful if this helps you

Thanks 

Valmik

Hi Valmik,

I want to achieve this only for OnHold State? Can you please help me out here.

 

Thanks

Hi,

Please take updated code, write after business rule . Mark my answer as correct or hit like based on impact

var incident = new GlideRecord('incident');
incident.addQuery('parent', current.sys_id);
incident.addQuery('state', '3');
incident.query();
while(incident.next()){

incident.state = current.state;

incident.update();

}
Please hit like and mark my response as correct if that helps
Regards,
Musab

Hi Musab,

Do I need to add anything in the filter conditions?

Thanks