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

Branching model UI bug - auto-merge toggle can incorrectly be in disabled state

      If you go to the Branching Model page for a repository with default settings, and deselect the Release branch checkbox then "Enable automatic merging" becomes disabled as expected (as neither condition for auto-merging is met).

      However if you now select a Production branch the "Enable automatic merging" checkbox remains disabled, even though it should be enabled in this state.

      You can get it back by toggling the Release checkbox on and back off again.

          Form Name

            [BSERV-5468] Branching model UI bug - auto-merge toggle can incorrectly be in disabled state

            Brent P added a comment -

            Stash 3.4.3 has been released with this fix.

            Brent P added a comment - Stash 3.4.3 has been released with this fix.

            Lucid Software added a comment - - edited

            Oh, that workaround does seem to work. I had misunderstood what would happen with specifying a production branch.

            I thought that if my production branch is v1, and if I pull request to it, then Stash would automerge with v2, v3, and master.

            v1
              \
               v2
                 \
                  v3
                    \
                   master
            

            But it doesn't. It merges only with master.

            v1
              \
              master
            

            This feature is really limited to having a single production branch at a time, in this case v1.

            For multiple release branches, I need to specify the prefix.

            (I had wanted to avoid that, since then the release prefix is confusingly the default for new branches, as our feature branch names vary, and we do not use prefixes there. I don't want release branches being made from JIRA issue. Devs will just need to select "Custom" each time.)

            Is that correct, that without a prefix, there is no version comparison...the only automerge happens from the single release branch to master?

            If so, it seems like there is just a UI bug, with a simple workaround.

            Lucid Software added a comment - - edited Oh, that workaround does seem to work. I had misunderstood what would happen with specifying a production branch. I thought that if my production branch is v1, and if I pull request to it, then Stash would automerge with v2, v3, and master. v1 \ v2 \ v3 \ master But it doesn't. It merges only with master. v1 \ master This feature is really limited to having a single production branch at a time, in this case v1. For multiple release branches, I need to specify the prefix. (I had wanted to avoid that, since then the release prefix is confusingly the default for new branches, as our feature branch names vary, and we do not use prefixes there. I don't want release branches being made from JIRA issue. Devs will just need to select "Custom" each time.) Is that correct, that without a prefix, there is no version comparison...the only automerge happens from the single release branch to master? If so, it seems like there is just a UI bug, with a simple workaround.

            Marcin added a comment -

            paul92 - after some more testing the change is not "sticking" because of the same bug that causes the auto-merge checkbox not to be enabled when you have the "release" branch disabled. The state of the auto-merge gets updated client-side based on the UI values, so this is why it shows as disabled / unchecked. The setting should still have persisted based on the state it was when you hit save, regardless of what you're seeing when the page refreshes.

            Obviously that's not ideal, and still a bug, as it's easy to lose the setting by resaving - but in my testing auto-merging still works as long as the checkbox was enabled when you hit save.

            Marcin added a comment - paul92 - after some more testing the change is not "sticking" because of the same bug that causes the auto-merge checkbox not to be enabled when you have the "release" branch disabled. The state of the auto-merge gets updated client-side based on the UI values, so this is why it shows as disabled / unchecked. The setting should still have persisted based on the state it was when you hit save, regardless of what you're seeing when the page refreshes. Obviously that's not ideal, and still a bug, as it's easy to lose the setting by resaving - but in my testing auto-merging still works as long as the checkbox was enabled when you hit save.

            3.4.0

            Lucid Software added a comment - 3.4.0

            Marcin added a comment -

            paul92 - just so I can check this on the right version, can you confirm which version of Stash you are running please?

            Marcin added a comment - paul92 - just so I can check this on the right version, can you confirm which version of Stash you are running please?

            Lucid Software added a comment - - edited

            One fix is to enable the release branch type. Why that isn't great for us:

            We don't use prefixes for "normal" (feature) branches. We can't have a feature branch type with an empty prefix, so the only branch type would be release. It would show first in the "Create branch" dialog, since there is no way to set the default (STASH-5031).

            So developers are finding that the branches they create have release prefixes on them, and it isn't obvious that they need to choose the "Custom" branch type every time in order to remove that prefix. So we wind up with a whole bunch of release branches that really aren't, or else we have do without the automatic merging.

            Lucid Software added a comment - - edited One fix is to enable the release branch type. Why that isn't great for us: We don't use prefixes for "normal" (feature) branches. We can't have a feature branch type with an empty prefix, so the only branch type would be release. It would show first in the "Create branch" dialog, since there is no way to set the default ( STASH-5031 ). So developers are finding that the branches they create have release prefixes on them, and it isn't obvious that they need to choose the "Custom" branch type every time in order to remove that prefix. So we wind up with a whole bunch of release branches that really aren't, or else we have do without the automatic merging.

            Lucid Software added a comment - - edited

            Lucid Software added a comment - - edited https://answers.atlassian.com/questions/10397133

            This is deeper than a UI-only bug. Even after toggling and enabling the checkbox, the setting doesn't stick, and automatic merging doesn't work.

            Lucid Software added a comment - This is deeper than a UI-only bug. Even after toggling and enabling the checkbox, the setting doesn't stick, and automatic merging doesn't work.

              Unassigned Unassigned
              mszczepanski Marcin
              Affected customers:
              1 This affects my team
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: