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.
Bitbucket Version 7.1.2
- Set a branch for example develop branch to do not delete on repository branch settings
- 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.
- 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.
- However when you merge the pull request it tries to delete the develop branch and throws an error as shown in the screen shot.
Should get merges without any error
A pop up error occurs saying (You cannot delete the branch. Please update the Branch Permissions or contact your project or repository administrator.)
No workaround possibly the previous set value is saved on browser storage
The same issue doesn't occur on Bitbucket 7.4+ versions, tested on 7.4 and 7.5 works without any issues.