Details
-
Bug
-
Resolution: Duplicate
-
Low
-
None
-
7.3.0, 7.6.3
-
None
-
7.03
-
5
-
Severity 3 - Minor
-
1
-
Description
Summary:
In case that a user has been renamed before where app_user table will have the user_key and lower_user_name different, if we use the REST Call to include a user into a certain project role, it will fail.
Steps to reproduce:
- Cerate a User that able to log in to JIRA.
- Rename the User.
- Execute the REST Call below:
POST /rest/api/2/project/{projectIdOrKey}/role/{id}
- For example,
curl -X POST --data '{"user":["user1"]}' localhost:8730/jira/rest/api/2/project/BA/role/10002 -H 'Content-type: application/json' -H'Accept: application/json' -u admin:admin
Expected Result:
The user will be added to the role.
Actual Result:
This will be thrown instead:
{"errorMessages":["We can't find 'user1' in any accessible user directory. Check they're still active and available, and try again."],"errors":{}}
Workaround:
Use the user user_key. To check the value, run the query below:
select * from app_user where lower_user_name = '<affected username in lowercase>';
Notes:
- With JIRA Public REST API documentation did not specify which need to be used, the expected here is that the REST Call is possible to use the username
- In any case, JIRA should be able to check the lower_user_name in app_user table what is the original username is.
Attachments
Issue Links
- is related to
-
JRASERVER-68189 Certain REST API endpoints require UserKey instead of UserName
- Closed
- relates to
-
JRASERVER-67263 Documentation update for updating project roles through REST API
- Closed