I'm trying this way if all child incidents are closed then parent incident should auto closed
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yesterday
(function executeRule(current, previous /*null when async*/ ) {
if (current.state.changesTo('7')) {
var task = new GlideRecord('incident_task');
task.addQuery('incident', current.parent_incident);
task.addQuery('state', '!=', '7');
task.query();
if (!task.hasNext()) {
var inc = new GlideRecord('incident');
if (inc.get(current.parent_incident)) {
inc.state = '7';
inc.description = "incident tasks are cosed hence closing the incident";
inc.setWorkflow(false);
inc.update();
}
}
}
})(current, previous);
Even after closing the child incident parent incident is not updating.
Even after closing the child incident parent incident is not updating.
0 REPLIES 0