Once Parent Incident Status Changes, Child Ticket Status Should Change automatically for all the states
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 03:06 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-31-2022 03:18 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 04:21 AM
Hi Valmik,
I want to achieve this only for OnHold State? Can you please help me out here.
Thanks

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 04:33 AM
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();
}
Regards,
Musab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-06-2022 05:26 AM
Hi Musab,
Do I need to add anything in the filter conditions?
Thanks