How to filter report to show incidents from caller that is part of a certain group

JC S_
Mega Guru

We are creating a report which should show incident tickets opened by users that are members of a certain group (for example group named, "GroupX"). How can we do this similar to these javascripts on filter: javascript:getMyGroups() or javascript:getAllMembersOfMyGroups()

3 REPLIES 3

nenkoneychev
Tera Guru

Hi Jimboy ,


Check the Business Rule OOTB Report Helpers. You may use part of it in Script Include   to getAllMembersOfMyGroups


Then Create report and set filter like this:


Sys ID is javascript:yourScriptIncludeHERE();


Check this topic Using Script Includes to filter a report  


Report HelpersGlobal [global]Defines a series of functions to help with generating reports:
  • getGroupMembers - Returns an array of all the users that are in any of the groups specified.
  • getGroupMembersGivenGroupName - Add members of a specified group into an array.
  • getGroupMembersGivenGroupID - Add members of a specified group into an array.
  • getAllMembersOfMyGroups - Gets an array of all users that belong to the same groups that the current user belongs to.

Thanks for this. How would this work with the Assigned To field? It works on the Caller field, but not on Created by field.


from the BR   change   var u = gs.getUserID(); to your requirement as you said to the current.created_by field or current.assigned_to .