Details
-
Bug
-
Resolution: Timed out
-
Low
-
None
-
6.1.5, 6.4
-
6.01
-
1
-
Severity 3 - Minor
-
Description
NOTE: This bug report is for JIRA Server. Using JIRA Cloud? See the corresponding bug report.
Given data where there are user entries with no associated application user (There's an entry in cwd_users without a matching key in app_users then JIRA will fail to display the edit issue page amongst others because of the faulty data.
You can determine whether the database in this state by running:
SELECT * FROM cwd_user WHERE lower_user_name NOT IN (SELECT lower_user_name FROM app_user);
This ultimately caused by the code in:
@Override public URI getAvatarURL(User remoteUser, String username, Avatar.Size size) throws AvatarsDisabledException { return getAvatarURLImpl(fromStaleUser(remoteUser), false, userManager.getUserByName(username), size); }
The exception comes from the call to userManager.getUserByName(username) because the username has an entry in cwd_users without a matching key in app_users.
The call to userManager.getUserByName should probably be userManager.getUserByNameEvenWhenUnknown or handle the exception, just as fromStaleUser does, so that JIRA can continue to work.
We should omit the user from places like Assignees.makeAssigneeOptions and userbrowser.jsp when they are in this invalid state.
Attachments
Issue Links
- derived from
-
JRASERVER-41888 Editing Issues Fails With the Message - User xxxx exists but has no unique key mapping
- Closed
- relates to
-
JRACLOUD-42475 Avatar Service should handle more gracefully non-existing / corrupt user entries
- Closed