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

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

            Kristy made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 443578 ]
            Kristy made changes -
            Remote Link Original: This issue links to "Page (Confluence)" [ 442243 ]
            Kristy made changes -
            Assignee New: Kristy [ khughes@atlassian.com ]
            Kristy made changes -
            Fix Version/s New: 6.6.0 [ 88690 ]
            Kristy made changes -
            Resolution New: Fixed [ 1 ]
            Status Original: Long Term Backlog [ 12073 ] New: Closed [ 6 ]
            Kristy made changes -
            Remote Link New: This issue links to "Bitbucket Server › Pull Request Build › bugfix-BSERV-11786-pull-request-participant-status-is-case-sensitive (server-syd-bamboo)" [ 442320 ]
            Kristy made changes -
            Remote Link New: This issue links to "Page (Confluence)" [ 442243 ]
            Andrei Khudavets made changes -
            Status Original: Needs Triage [ 10030 ] New: Long Term Backlog [ 12073 ]
            Andrei Khudavets made changes -
            Labels New: dob-pr
            Andrei Khudavets made changes -
            Priority Original: Low [ 4 ] New: Medium [ 3 ]

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

                Created:
                Updated:
                Resolved: