Create branch from issue UI doesn't use source branch
Summary
In an issue, there is an option to create a merge requestion or a branch. If you choose to create a branch, you have a UI that lets you enter the source branch name as text. These all stem from the fact that you have to type in a branch name instead of selecting it from a drop-down like every other place in GitLab.
- Since the name search is asynchronous, sometimes it brings back a result and erases what you've typed so far before you've finished typing. I can't consistently reproduce this.
- If you type in a branch name and it turns green, you must press the Create button. If you hit enter, it creates a branch, but it does not use the name you typed in as the source branch. This is the key issue that is a concern for this ticket.
Steps to reproduce
- Go to an issue.
- Change the Create Merge Request button to Create Branch.
- Click Create Branch.
- Enter a source branch name other than
master
. - Ensure that it turns green and is indicated to be a valid branch.
- Hit the enter key instead of clicking the Create Branch button.
Example Project
This can be observed anywhere.
What is the current bug behavior?
The new branch is created from the default branch of the project (usually master
) instead of the source branch typed into the box.
What is the expected correct behavior?
The new branch is created based on the branch typed on the box.
Output of checks
This bug happens on GitLab.com
Possible fixes
Switch the source branch selector to a drop-down. Free-form entry is of absolutely no value here.
Edited by Joel Feiner