When a user creates a report and then later has a user name change (for example, they have gotten a new primary email address and a new username/login), reports do not display correctly under the My Reports section.
Steps to Reproduce
Log in to the instance.
Impersonate a user (for example, Fred Luddy).
Create two new reports under this user's name.
Note that the reports appear under My Reports in the report_home section.
Amend the username (for example, change the name to Fred Luddy-Now).
Log out and log back in for the change to take effect.
Check My Reports and note that the two reports do not show (there is no match between [sys_user] and [sys_report] tables).
Create a new report.
Note that the new report shows correctly under My Reports because the created_by value in the [sys_report] table matches the username in the [sys_user] table.
Note: If you have thousands of records in the [sys_report] table where the username has been changed, then this workaround is not advisable.
Manually edit the Created By field in the [sys_report] table with the new value of the username. This needs to be performed by an Admin user as it requires a temporary base system change, which should then be reverted back once the update is complete.
To enable list editing on the sys_report table:
- Navigate to System UI > List Control.
- Search for sys_report.
- Open the record and change the List edit type from Disable list editing to Save immediately (cell edit mode).
- Navigate to the list view of [sys_report] table and sort or filter by the Created By field.
- Replace the old username value with the new username value.
- Go back to List Control and set the List edit type value back to Disable list editing for the [sys_report] table.
Related Problem: PRB651917