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

Users added as default reviewers are added to PR's even after becoming unlicensed or removed causing PR creation to fail without manual intervention

    XMLWordPrintable

Details

    Description

      Issue Summary

      Users added as default reviewers are added to PR's even after becoming unlicensed or removed. This causes a problem when you create a pull request as you are given an error "Error encountered while adding some reviewers to this pull request" The issue is, what user needs to be removed is not indicated causing the PR creator to figure it out

      This is reproducible on Data Center: Yes
      This is reproducible in recent versions of the software: Yes - Tested in 8.5.0, 7.17.1, and 7.24.4

      Steps to Reproduce

      1. Add two licensed users to a repository or project permissions. I used write permissions but I believe that Read or Admin would have the same result
      2. Edit the repository or project settings for Default Reviewers. Add both users as defualt reviewers. I did Any Branch to Any Branch but the same issue happens with any combination. I also set require 1 approval
      3. Create a pull request that meets the requirements defined in step 2. Note that the two users are added as defualt reviewers as they should.
      4. Next, make one of the users becomes unlicensed. I did this by removing the user from the stash-users group but any method of making the user unlicensed is fine
      5. Return the the repository or project settings and look at the default reviewers, note that the user that is unlicensed is still listed
      6. Create a pull request that meets the requirements defined in step 2. Note that both users are added as defualt reviewers but if you attempt to create the pull request you will get the error: Errors encountered while adding some reviewers to this pull request however, there is no indication of what user reviewer caused the problem.
      7. if you remove the unlicensed user, you are not able to add them again and you are able to create the pull request

      Expected Results

      In order of preference:

      • Unlicensed users should not be automatically added as defualt reviewers even if they are still listed as default reviewers (they could become licensed again)
      • Unlicensed users could be removed from the Default Reviewers when they become unlicensed
      • The user(s) that are causing the PR to not be created sould be listed in the error message so that they can be removed more easily

      Actual Results

      Unhelpful message is displayed on the screen and the PR creator must determine on their own which user must be removed or in large organizations where the PR creator may not know that a default reviewer has become unlicensed, they may have to remove all the default reviewers and then add them back in manually

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

      Attachments

        Issue Links

          Activity

            People

              mgoyal2@atlassian.com Manish
              cdrummond Craig Drummond
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: