Issue
Symptoms
If the report is created by a user(Fred Luddy) and that user(Fred Luddy) can view his report in View / Run module under "My Report" section. If user (Fred Luddy) leaves the organization, then another user (ITIL user) cannot have the ownership of the report that user(Fred Ludy) has created, as report is being owned by Fred Luddy.
Release
Jakarta, Kingston, London
Cause
- The owner has an access to view his reports in "My reports" section whereas other users cannot view this report in "My Reports" section. At a time only one user can have the ownership of the report.
Resolution
In order to change the owner of the report please follow the below Steps.
- Log in as an "admin" user in the instance.
- Go to System Definition --> Scripts - Background and execute below script accordingly.
var gr=new GlideRecord('sys_report');
gr.addQuery('sys_id','c825d02fdb8623001fbca0f2ca96190e'); //Sys Id of report
gr.query();
if(gr.next()){
var name=gr.title;
gs.print('Name of report '+name);
gr.user= '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.created_by_user = '681b365ec0a80164000fb0b05854a0cd'; // Sys Id of User you want to make the owner of the report.
gr.update()
}
Please note Sys Id of the report can be found in "sys_report" table and Sys Id of User can be found in "sys_user" table.
Additional Information
This KB can be used if the customer wants to change the owner of the report.