Automatically created MR uses wrong target branch (when branching from Tag)
Summary
Using the new source branch picker via the "Create merge request" button on the issue screen (#21143 (closed)) is used by our company to create hotfixes. This worked perfectly for us since the introduction of this option. Since #41727 (closed) this functionality is broken. For our code release we create a new tag and a CI-job deploys our code. Since we branch of a tag for a hotfix, the target branch in the newly created merge request is the tag name and that is not a valid/existing branch. GitLab will show a red error message telling the user it can't render the MR properly. After this we will have to edit the MR and change the target branch to the default branch. It would be very convenient that there will be a check if the target branch exists and if not, change it to the default branch.
Steps to reproduce
- Create issue
- Click dropdown and choose a tag as your source branch.
- Go to the automatically created MR
- See a red error message that GitLab can't render the MR
Example Project
MikeTralala/test-branching-of-tag-name!1 (closed)
What is the current bug behavior?
Target branch for newly created MR is always the provided source branch / Shows an error message: "We cannot render this merge request properly because does not exist in "
What is the expected correct behavior?
Target branch for newly created MR is the default branch when the source branch is a Tag or does not exist
Relevant logs and/or screenshots
N/A
Output of checks
This bug happens on GitLab.com and on our local install (omnibus CE) which is at version 10.5
Related to #41727 (closed)