Reporting on Incident Opened by a Member of a Group?

spaceyjacey
Kilo Contributor

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'?"

22 REPLIES 22

HI,



I created a script include:


-----


function getGroupMembers(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;


}


-----


and then created a dynamic filter option.



javascript:getGroupMembers('IT Service Desk')


I have a question,


If the group is a list, that means


javascript:getGroupMembers('Service Desk,Software')



how to implement the Business Rule??


BenPhillipsSNC
Kilo Guru

spaceyjacey, I would mark john roberts' post as "correct answer" for future reference so people know this is answered. Looks like that is the answer.



Thanks


Sven Sulzmann
Tera Contributor

Hi there,



does anyone use this business rule with the Fuji Release?


It was working perfectly until Eurka, but since the upgrade to Fuji it doesn't.



Regards


Sven


Hi Sven,



Yes, I'm on Fuji and it works ok but I used it a little differently.



I created a script include:


-----


function getGroupMembers(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;


}


-----


and then created a dynamic filter option.



javascript:getGroupMembers('IT Service Desk')



cheers,


Alan