Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-73719

Using REST API to add an Inactive User, group together to a project rule fails.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Not a bug
    • Low
    • None
    • 8.22.0
    • REST API
    • None

    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

      1. 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 ~ %  
      2. 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. 

      Attachments

        Activity

          People

            Unassigned Unassigned
            afd2063a99c7 Vamshi R
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: