- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 08:49 AM
Hello,
I am facing difficulty in taking report of users who dont have itil roles,
Current functionality is we created a group name ITIL and added the itil role to that group, when i assigned by default child roles related to itil are getting assigned to users, like if i add X user to ITIL group that user is getting itil, dependcy views, certification etc roles which is working fine. Now the problem is we have few users who are added manually to dependecy views roles who dont have itil role or not added to itil group we want that users report.
Please help me out to get the users who added manually with dependecy_views role and added to itil group
Solved! Go to Solution.
- Labels:
-
Dashboard
-
Performance Analytics
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 12:19 PM
Related List Conditions come in with the new Report Designer which you can enable in Istanbul and is enabled by default in Jakarta. In Helsinki, you have to do a little more work.
You can try a one-liner in the report. This should give you all the users who have the itil role: [Note this must be in one line or it will not work.]
javascript:var users = []; var gra = new GlideAggregate('sys_user_has_role'); gra.addQuery('active', '=', true); gra.addQuery('role.name', '=', 'itil'); gra.groupBy('user'); gra.query(); while(gra.next()){users.push(gra.getValue('user'));} users;
You'll use this with something like (on the sys_user table):
sys_id IS <insert the script above>
One-liners like this (with a loop in it) no longer work in Jakarta but you have related list conditions at that point so you rarely need them. If you still need this, you can put the logic in a script include and create a scripted filter or dynamic filter option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 10:45 AM
Can you run a report on the sys_user table with a related list condition on User Role (sys_user_has_role)?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 11:47 AM
Adam,
We still using Helsinki and we dont see Related list option option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2018 12:19 PM
Related List Conditions come in with the new Report Designer which you can enable in Istanbul and is enabled by default in Jakarta. In Helsinki, you have to do a little more work.
You can try a one-liner in the report. This should give you all the users who have the itil role: [Note this must be in one line or it will not work.]
javascript:var users = []; var gra = new GlideAggregate('sys_user_has_role'); gra.addQuery('active', '=', true); gra.addQuery('role.name', '=', 'itil'); gra.groupBy('user'); gra.query(); while(gra.next()){users.push(gra.getValue('user'));} users;
You'll use this with something like (on the sys_user table):
sys_id IS <insert the script above>
One-liners like this (with a loop in it) no longer work in Jakarta but you have related list conditions at that point so you rarely need them. If you still need this, you can put the logic in a script include and create a scripted filter or dynamic filter option.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-09-2018 12:04 AM
Great that helped me. Thank you so much you helped my time