Users can able to see their parent group or nested group tickets only
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-19-2023 11:22 PM
we have categories and their assignment groups like
1. Hardware - (Hardware group)
2. Software - (Software group)
3. Resource - (Resource group)
4. Inquiry- (Inquiry group)
every parent group has nested groups of up to 20+
if the logged-in user is a member of the Hardware group or any of its child groups, he can only see tickets which
'Category' = "Hardware"
if the logged-in user is a member of the Software group or any of its child groups, he can only see tickets which
'Category' = Software"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2023 09:15 AM
Hello @sd khaja ,
Create before query business rule on incident table and write the below script.
(function executeRule(current, previous /*null when async*/) {
// Add your code here
var arr=[];
var grmem=new GlideRecord('sys_user_group');
grmem.addQuery('parent','software group sys_id');
grmem.query();
while(grmem.next())
{
arr.push(grmem.getValue('name'));
}
if(gs.getUser().isMemberOf('software group name'))
{
for(var i=0;i<arr.length;i++)
{
if(gs.getUser().isMemberOf(arr[i]))
{
current.addQuery('category','software');
}
}
}
})(current, previous);
Please mark my answer as correct and helpful if it helps you.
Regards,
Namrata