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

Pull request Merge tries to delete the Branch set to "Do not delete" on repo branch settings

XMLWordPrintable

      Problem

      When a branch (with deletion prevention permission) gets merged into another branch - after some other branch has been merged with the "delete source branch after merging"-flag being set before - then an error (You cannot delete the branch. Please update the Branch Permissions or contact your project or repository administrator.) is being shown as if the delete-flag would have been set (but is not visible on the confirmation dialog) for the current branch to be merged.

      Environment

      Bitbucket Version 7.1.2

      Steps to Reproduce

      1. Set a branch for example develop branch to do not delete on repository branch settings
      2. Create and merge a pull request to the develop branch set "Delete source branch after merging" in the pop up the source branch gets deleted as expected and the changes gets merged to develop.
      3. Now create a pull request to merge Develop branch to master and the "Delete source branch after merging" option is greyed out since delete prevention is enabled on branch settings.
      4. However when you merge the pull request it tries to delete the develop branch and throws an error as shown in the screen shot.

      Expected Results

      Should get merges without any error

      Actual Results

      A pop up error occurs saying (You cannot delete the branch. Please update the Branch Permissions or contact your project or repository administrator.)

      Workaround

      No workaround possibly the previous set value is saved on browser storage

      Notes

      The same issue doesn't occur on Bitbucket 7.4+ versions, tested on 7.4 and 7.5 works without any issues.

              khughes@atlassian.com Kristy
              5338c0aa34f9 Danny Samuel
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: