
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 11:18 AM
We use Parent Incident / Incident relationships (Istanbul).
I'm working on a Business Rule that will reopen an Incident if the customer (caller_id) adds a comment in the UI (not a baseline functionality).
However if the current incident is the parent of one or more other Incidents, the BR should NOT fire. I'm having a hard time with adding the condition and am looking for some help.
In other words the BR needs to check if the current Incident has one or more child incidents associated with it (not the other way round).
If I have to, I'm willing to add a Boolean field to the Incident table and update it to 'true' at the moment it is added as the 'Parent Incident' in a child incident is added (and 'false' when removed) but I'd rather avoid that if possible.
Any help is appreciated. Thank you!
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 11:23 AM
Of course as soon as I posted this I found it.
There's a counter on the Incident table called 'child_incidents'. I've confirmed this keeps track properly as child incidents are added and removed.
So the condition I'm looking for is 'Child incidents' | 'is' | '0'.
Yay!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 11:23 AM
Of course as soon as I posted this I found it.
There's a counter on the Incident table called 'child_incidents'. I've confirmed this keeps track properly as child incidents are added and removed.
So the condition I'm looking for is 'Child incidents' | 'is' | '0'.
Yay!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 11:24 AM
In scripting, you would do a basic script:
var inc = new GlideAggregate('incident');
inc.addAggregate('COUNT');
inc.addQuery('parent', current.sys_id);
var inc_count = 0;
inc.query();
if(!inc.next()){
// do your stuff here
}

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2017 12:07 PM
Man that's a beautiful alternative and what I'd have used for certain had I not found the child_incidents attribute. Thank you Mike!