Uploaded image for project: 'Bitbucket Data Center'
  1. Bitbucket Data Center
  2. BSERV-11786

Capital case username does not work with updating PR participant status API

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 6.6.0
    • 6.2.0, 6.3.1
    • None

      Issue Summary

      userSlug with capital case in the REST API URL /rest/api/1.0/projects/<projectKey>/repos/<repositorySlug>/pull-requests/<pullRequestId>/participants/<userSlug> does not work

      Steps to Reproduce

      1. Create a username testName
      2. Create a project TST
      3. Create a repository reponame
      4. Create pull request with ID 1
      5. Create a file test.json with the following content:
        {
        "status": "NEEDS_WORK"
        }
        
      6. Run the following cURL:
        curl -u testName -X PUT -H "Content-Type: application/json" -d @test.json http://localhost:7990/rest/api/1.0/projects/TST/repos/reponame/pull-requests/1/participants/testName 
        
        

      Expected Results

      The status update is successful

      Actual Results

      It fail with the following reply

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?><status><status-code>403</status-code><message>You may only update your own status.</message></status>
      

      Workaround

      Changing userSlug from capital case to lower case will work fine

          Form Name

            [BSERV-11786] Capital case username does not work with updating PR participant status API

              khughes@atlassian.com Kristy
              klfoong Foong (Inactive)
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: