How to create a report with assignment groups and parent group combined
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2025 07:32 AM
I am trying to create a report which shows the number of open incidents and requests in a month. We have a number of assignment groups (for example Helpdesk UK, Helpdesk Italy) and then a parent IT Applications group which has sub groups for different applications. I want the report to show the top level groups for Helpdesk UK, Helpdesk Italy and then IT applications (which needs to include all the tickets for in IT applications including the child groups). Is this possible?
For clarity, say there were 30 tickets in UK, 20 in Italy, 10 in the parent IT apps, and 5 in the child grps of IT apps it would show 3 columns of 30 (UK), 20 (Italy) and 15 (IT apps). Currently the IT apps will only show those specifically assigned to it, not the child groups
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-15-2025 07:42 PM
Yes, you can get the child group incidents or requests using script include.
I tried in PDI by considering 'Database' as a parent group and the report shows all child groups.
See below screenshots:
script include logic:
var GroupUtil = Class.create();
GroupUtil.prototype = {
initialize: function() {},
getChildGroups: function(groups) {
var finalGroups = [];
var gr = new GlideRecord("sys_user_group");
gr.addQuery("parent", "IN", groups);
gr.query();
gs.info(gr.getRowCount());
while (gr.next()) {
finalGroups.push(gr.getUniqueValue());
}
finalGroups.push(groups);
return finalGroups;
},
type: 'GroupUtil'
};
Hope this helps
Murthy