All Incidents created by Group Members

SNOW46
Tera Contributor

Hi All,

I want to configure one report on Incident Management that all the Incidents which were created by each and every member of my group.

The members who belongs to my group and who all have created the Incidents.

 

Please suggest me on the same.

 

Thanks,

SNOW@Das

6 REPLIES 6

Ct111
Giga Sage

Go to the report and in the filter condition add the following 

 

Assignment Group     is(dynamic)     One of My Groups

 

Generate report as per your type the task is done .

 

Mark my ANSWER as CORRECT and HELPFUL if it helped.

SNOW46
Tera Contributor

Hi,

 

The solution given by you doesn't work it seems. Because the condition itself says it will filter the Assignment Groups of mine to which I belong to.

But I need to fetch the report for the Incidents created by each and every member who belongs to my group including me as well.

 

Please suggest.

 

Community Alums
Not applicable

Hi,

 

As I understand you need the report of incidents that was created by your team members. You can do it in following steps:

1) Create a new script include function which fetches the current user's groups and then all the members of the group and return the members of group

This function will look like (untested code)

var groups = gs.getMyGroups()l

//Loop through all the groups and their members respectively

var userIds = [];

var gr = new GlideRecord('sys_user_grmember');

gr.addQuery('group', groupSysId);

gr.query();

while (gr.next()) {

userIds.push(gr.getValue('user'));

}

userIds = userIds.join(',');

return "sys_idIN" + userIds;

2) In the report, put filter as 'Created By' javascript:YourScriptIncludeFunction()

 

Let me know in case of any issues.

Cheers,

Hardit Singh

Does it works. Can you please let me know.

Also please let me know in the script where do I need to put the Group Name and member names if any.