-
Bug
-
Resolution: Fixed
-
Low (View bug fix roadmap)
-
8.20.30, 9.12.11, 9.4.24
-
8.2
-
2
-
Severity 3 - Minor
-
4
-
Issue Summary
The Board Administrators User Picker returns "No Matches" if there are more than 15 matching users:
Steps to replicate
- Go to the User Management page and create 17 Jira users with usernames like this:
- julien.rey@localhost
- julien.rey.2@localhost
- julien.rey.3@localhost
- etc...
- julien.rey.17@localhost
- Open any board configuration page
- Search for the user "julien.rey@localhost" in the Administrators user picker
Expected behavior
There should a result, since the user "julien.rey@localhost" exists.
Actual behavior
The user picker shows "no matches":
Note
When collecting a HAR file, we can see that when the issue occurs:
- a call is made to the URL below:
<JIRA_BASE_URL>/rest/greenhopper/1.0/rapidviewconfig/boardadminspicker?maxResults=15&query=julien.rey%40localhost&_=1721220764624
- the search is limited to 15 results, and matches 15 users which have a similar user name. However, due to the search limit, some users are missing such as the user "julien.rey@localhost"
{ "users": [ { "displayName": "julien10", "name": "julien.rey.10@localhost", "key": "JIRAUSER10207" }, { "displayName": "julien11", "name": "julien.rey.11@localhost", "key": "JIRAUSER10208" }, { "displayName": "julien12", "name": "julien.rey.12@localhost", "key": "JIRAUSER10209" }, { "displayName": "julien13", "name": "julien.rey.13@localhost", "key": "JIRAUSER10210" }, { "displayName": "julien14", "name": "julien.rey.14@localhost", "key": "JIRAUSER10211" }, { "displayName": "julien15", "name": "julien.rey.15@localhost", "key": "JIRAUSER10212" }, { "displayName": "julien16", "name": "julien.rey.16@localhost", "key": "JIRAUSER10213" }, { "displayName": "julien17", "name": "julien.rey.17@localhost", "key": "JIRAUSER10215" }, { "displayName": "julien2", "name": "julien.rey.2@localhost", "key": "JIRAUSER10200" }, { "displayName": "julien3", "name": "julien.rey.3@localhost", "key": "JIRAUSER10201" }, { "displayName": "julien4", "name": "julien.rey.4@localhost", "key": "JIRAUSER10202" }, { "displayName": "julien5", "name": "julien.rey.5@localhost", "key": "JIRAUSER10203" }, { "displayName": "julien6", "name": "julien.rey.6@localhost", "key": "JIRAUSER10214" }, { "displayName": "julien7", "name": "julien.rey.7@localhost", "key": "JIRAUSER10204" }, { "displayName": "julien8", "name": "julien.rey.8@localhost", "key": "JIRAUSER10205" } ], "groups": [] }
Workaround
Temporarily renaming the user
For the user that can't be added as an administrator:
- Go to the User Management page
- Temporarily edit the username of this user from the JIRA UI to a unique value, for example: "dummy_user"
Note that it will only be possible if the user is coming from Jira's internal directory
If the user is coming from an external directory, then the user will need to be updated in the LDAP, and Jira's user base needs to be synced with the LDAP
- After that, add the user to the Board Administrators list (this should be possible now, since the username is unique)
- Change the username back to its original value
Using Jira's REST API
The only workaround we can suggest for now is to make a call to Jira's REST API to manually add the user as a board administrator.
The steps are the following:
- First, identify the user key of all the usernames that should be Board Administrators including the ones which have already been added via the Jira Database by running the SQL query below (after replacing <USER_NAME_X> with the user name in lower case). You should get a user keys with the format JIRAUSERXXXXX:
select user_key from app_user where lower_user_name in ('<USER_NAME_1>', '<USER_NAME_2>');
- Send a request to Jira's REST API using the parameters below:
- End point:
<JIRA_BASE_URL>/rest/greenhopper/1.0/rapidviewconfig/boardadmins
- Method: PUT
- Authorization: Choose the authorization method of your choice. One option is to use a PAT Token with the Bearer Authorization
- Payload - Make sure to replace all the instances of <USER_KEY_X> with the user keys found from the Jira DB:
{"id":1,"boardAdmins":{"userKeys":["<USER_KEY_1>","<USER_KEY_2>"],"groupKeys":[]}}
- End point: