How to get child incidents for all parent incidents in a report
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2014 02:43 AM
We have parent child relationships in incident. we would like to pull a report which have child incidents.
Like for example if a parent is having 3 childs in a report i need to know the parent and incidents associated with parents...
can anyone help me to pull a report on it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2014 03:03 AM
I would add filter: Parent IS NOT EMPTY
Group By: Parent
that should bring back all children grouped by their parent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2014 03:10 AM
Thanks for the reply mguy, Yeah that way i am also able to generate reports. but when i export to excel incident is having 3 childs and related incidents field showing 3. Now i need to see child numbers beside each parent incident.
For ex: INC1 is having INC2 and INC3 as childs my report should be like this
Parent childs
----------- ---------------------
INC1 INC2, INC3

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-19-2014 12:13 PM
You for that, aside from making a custom chart, you would need to add an additional string field (ie: u_children_summary) and create a rule to trigger on incident after updates when parent.changes();
The BR could look like this:
=== Script follows ===
var papa = new GlideRecord('incident');
papa.addQuery('sys_id', current.parent);
papa.query();
papa.next();
var children = new GlideRecord('incident');
children.addQuery('parent', papa.sys_id)
children.query();
papa.u_children_summary = '';
while (children.next()){
if(papa.u_children_summary != ''){
papa.u_children_summary = papa.u_children_summary + ", ";
}
papa.u_children_summary = papa.u_children_summary + children.number;
}
=== {untried, might need tweaking} ===
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-09-2022 08:03 AM
Hi Pavan,
Can you tell if you able to do what you wanted? If yes, can you please confirm how did you do that? THe exact report?