Mass updating "User" field in sys_report table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 08:21 AM
Hello,
I am trying to limit/remove visibility on the 500+ reports in the global tab of view/run - we have no interest in any of our users seeing any of these reports or being able to run them. However, I am having trouble changing the user field from the sys_report table directly, and seem to have to edit each individual report to change the user from GLOBAL.
Is there a way to do this en masse?
Secondly: Is it possible to remove the GLOBAL tab from the View/Run module? Ideally, the majority of our ITIL users would ONLY have the group tab, showing them the reports we have explicitly shared with them. A select number would also have the ability to create their own reports, and have the "My reports" second available. However, I seem to be having difficulty in finding where this screen can be configured.
Thanks for your help!
- Labels:
-
Reporting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 08:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2019 08:52 AM
Sebastian,
You can use the below fix script in the Background to change the user filed in the sys_report table en masse. You will need to know the sys_id of the user record you want to reassign to these 500+ report records.
var newUser = ''; //Enter sys_id of new user record here
var gr = new GlideRecord('sys_report');
gr.addQuery('user', 'GLOBAL');
gr.query();
if (gr.next()) {
gr.user = newUser;
gr.setWorkflow(false);
gr.update();
}
For your second ask, I assume the report_home Angular object is hidden fro our purview.
Thanks,
Derrick Johnson