If a user updates the Configuration Item field on an incident record and later that user's record is deleted from the instance, the Activity Formatter breaks if the Relation Changes field is added, or if a user updates the Configuration Item field and the User ID of that user is later modified. The Activity Stream does not load if relationship changes are in the feed and modifications were made by an invalid user or a user that no longer exists.
Steps to Reproduce
Impersonate an admin user, for example, Fred Luddy from the demo data.
Navigate to Incident > Open.
Select any Incident and note its number.
Right-click in the form header and choose Configure > Related Lists.
Add Task >Parent to the Selected list and click Save.
Go to the Tasks related list on your Incident and click Edit.
Move any Task to selected and click Save.
An activity stream entry for your relationship change is displayed.
Delete or change the user ID from the admin account (in this example, Fred Luddy).
Reload the Incident from earlier.
Note that instead of the user ID for the invalid account being displayed, the activity stream doesn't load at all and NPE errors are listed in the logs.
- Ensure that the Relation Changes field is added to the incident activity formatter through either UI properties or through the incident record.
- Through UI properties:
- Navigate to System Properties > UI Properties.
- In the Incident activity formatter fields text box, add *Relations* (if it is not there already).
- Through an incident record:
- Through UI properties:
- Impersonate a user that has the itil or admin role (these roles can update incident records).
- Open any existing incident record.
- Change the value of the Configuration item field.
- Click Save.
- Impersonate a different user that has the admin role to be able to delete a sys_user record.
- Delete the record of the user you impersonated in step 2.
- Browse to the same incident record you opened in step 3.
Note that the message Record activity will display here is displayed instead of the activity log entries.
This problem is fixed in all currently supported versions. Please review the Fixed In section to determine the latest available patch your instance can be upgraded to.
The possible workarounds on earlier versions were the following:
- Create an inactive user with a matching user ID of the user who was deleted or is otherwise no longer valid.
- Configure the Activity Stream to not display relationship changes.
Related Problem: PRB720998