Ug is not a valid user error while adding user as a Board Admin
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Where a workaround involves running SQL scripts directly on your database, we strongly recommend you do this first on a non-production, staging or test environment before running the scripts on your production database. We also strongly recommend you take a backup of your data before making any modifications via SQL scripts.
Summary
Trying to add a new board admin will throw the following error in the UI upon saving the new Board Admin user;
Environments
- Jira Data Center 8.20.7 and lower
- Jira Data Center 8.21.0 - 8.22.1
Diagnosis
Query the app_user table to see the user_key of the specific user-facing the error:
select * from app_user where lower_user_name = 'psouza'
You may find the following:
ID | user_key | lower_user_name |
---|---|---|
11054 | ug:1287e681-a24c-44ec-bac7-e72ad966a9a2 | psouza |
11153 | ug:55617a31-bbeb-4d7b-857a-776684313a24 | pedro.souza |
Cause
The issue happens because of a bug from the cloud instance: - JSWCLOUD-20732Getting issue details... STATUS the bug is fixed in Cloud so that those user keys will no longer cause the error in the Cloud, the bug fix is now ported to Jira Data Center in versions 8.20.7, 8.22.1 and 9.0.0: - JSWSERVER-20897Getting issue details... STATUS
Resolution
We introduced the feature flag com.atlassian.jira.agile.darkfeature.handle.ug.usernames.enabled that allows Jira to handle these user_keys from Cloud;
Upgrade to one of the fixed versions then you can add the dark feature flag at: /secure/admin/SiteDarkFeatures!default.jspa
Alternatively, in the instance that Jira Data Center did not go through a migration from Jira Cloud, there is the following solution:
1. Assign the associated user to a specific group.
2. Open the board's Configure page to modify it:
3. Set the group as part of the Administrators role of the board: