Details
-
Bug
-
Resolution: Not a bug
-
Low
-
None
-
8.22.0
-
None
-
8.22
-
1
-
Severity 3 - Minor
-
Description
Issue Summary
This is reproducible on Data Center: yes
Adding actors to a project role using REST API fails when the input contains an "Inactive" user i.e if the input contains an inactive user and a valid group, even the valid group doesn't get added.
Steps to Reproduce
- Create an input file for the REST API call. It should contain an "Inactive" user and a valid group.
xxxxxx@xxxxxx ~ % cat roles.txt { "group" : ["jira-software-users"],"user" : [“inactive_user”] } vrompally@C02G40RNMD6R ~ %
- Make a REST API call to add the above actors to a project role using any REST API client (cuRL has been used in this example.)
xxxxxx@xxxxxx ~ % curl -u admin:admin -X POST --data @roles.txt -H "Content-Type: application/json" http:/<Jira base URL>/rest/api/2/project/SOF/role/10002
Expected Results
The Group gets added to the project role although it is expected that the inactive user does not get added.
Actual Results
REST API call fails with the below error and the Group is NOT added to the project role.
xxxxxx@xxxxxx ~ % curl -u admin:admin -X POST --data @roles.txt -H "Content-Type: application/json" http:/<Jira base URL>/rest/api/2/project/SOF/role/10002 {"errorMessages":["We can't find 'JIRAUSER10100' in any accessible user directory. Check they're still active and available, and try again."],"errors":{}}%
Workaround
Avoid using inactive users in the input.