- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-04-2025 02:09 AM
I have a group with many assignees.
I want to show which assignees (users) who have no (zero) tickets (incidents).
- I have tried both tables (incidents and members).
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-06-2025 02:58 PM
There are multiple ways of doing this, but for a simple, quick report, I'd probably do a report based on the sys_user with the conditions:
user ID is one of [list of users from the group]
Then in the RELATED LIST CONDITONS, change the condition to None, No selected table records are related to a record on User [Incident ->Assigned to].
Add any further conditions you want to check on the incident table, like active=true to have it only look at active incidents.
This should return the users that don't have any matching tickets on the incident table.
You could also probably create some fancy database view, but my brain is too tired to figure out the joins atm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2025 08:58 AM - edited 05-05-2025 09:18 AM
Hi David,
Thank you for your response. I believe the snippet condition is only for Incident, and to find other tasks like Change, Problem, or SCTask, we can use the Task table instead of Incident->Assigned To.
I hope these conditions are okay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 09:35 AM
Ya, unfortunately the sys_user_grmember table doesn't have a relationship to the task table so you can't use the 'related to' option on that. You probably could create a database view that joins the group member table to the user table to the incident table but that might be a bit much.
Another thing you could do is create a script include to return a list of the members of the group, then you can call it in the report query
script include could include a function like below
getGroupMembers: function(grpSysid) {
//var grpSysid = '07e76467dbe5f200276cd5ab5e961917';
var grpMembers = [];
var grGrp = new GlideRecord('sys_user_grmember');
grGrp.addQuery('group', grpSysid);
grGrp.addQuery('user.active', true); //only return active users
grGrp.query();
while (grGrp.next()) {
grpMembers.push(grGrp.user.sys_id + '');
}
if (grpMembers.length > 0) {
return grpMembers;
} else {
return false;
}
return "oh no I shouldn't be here";
},
Then in the filter you do sys_id IS javascript:new RandomStuffs().getGroupMembers('<sysid of the group you want to get members of')
and it should return the list of users that were in that group, and you wouldn't have to enter the people manually.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2025 12:24 AM
Thanks.
Unfortunately, I don't think I have the rights (or skills) to create database or script.