Reporting on Incident Opened by a Member of a Group?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-05-2009 05:05 PM
We have many members of each group and we want a report on all incidents opened by members of a particular group. The only way we are able to run the report is to filter:
"Opened by - is - Brian - OR Opened by - is - Craig - OR Opened by - is - Alex - OR and so on..."
Is there a way to filter "Opened by - is - a member of 'Service Desk'?"
- Labels:
-
Service Mapping
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-14-2009 07:42 PM
You could use a similar process as getMyAssignments function that gathers delegate tasks.
Create a global business rule with a function to get group members for a given group.
function groupMembers(grpName) {
var mbrs = new Array();
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group.name', grpName);
grmember.query();
while (grmember.next()) {
mbrs.push(grmember.user.toString());
}
return mbrs;
}
Then your filter would be:
Assigned to is javascript:groupMembers('Service Desk')
When the filter runs it will resolve to the list of group members and match records where assigned to is anyone in the group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-12-2011 05:37 PM
[quote=john.roberts]You could use a similar process as getMyAssignments function that gathers delegate tasks.
Create a global business rule with a function to get group members for a given group.
function groupMembers(grpName) {
var mbrs = new Array();
var grmember = new GlideRecord('sys_user_grmember');
grmember.addQuery('group.name', grpName);
grmember.query();
while (grmember.next()) {
mbrs.push(grmember.user.toString());
}
return mbrs;
}
Sir John Roberts,
To us mere mortals you are a demigod 😉
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-23-2014 11:04 AM
Hi John,
For some reason, this works on the 'assigned_to' but not the 'opened_by' field.
Any suggestions?
Regards,
RV

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2014 11:58 AM
Did you ever get a response? I have the exact same requirement - report on who opened the incident....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-08-2014 12:42 PM
Hi Cindy,
I was able to do with the following:
1. 1. Create Global Business Rule called 'getGroupMembers' with the following script:
2.
3. function groupMembers(grpName) {
4. var mbrs = new Array();
5. var grmember = new GlideRecord('sys_user_grmember');
6. grmember.addQuery('group.name', grpName);
7. grmember.query();
8. while (grmember.next()) {
9. mbrs.push(grmember.user.toString());
10. }
11. return mbrs;
12. }
2. Using the following javascript in a report to get the desired result:
Opened By = javascript:getGroupMembers('ENTER GROUP NAME')
1.
2. Let me know if you have any issues.
Regards,
RV