Target branch changes to default when source branch is changed in MR
Summary
When creating a new merge request, if we choose a target branch first and choose the source branch after, target branch is changed to the default branch again.
Steps to reproduce
- Select a project
- On the left, click on “Merge Requests”
- Click the “New merge request” button
- Immediately change the Target branch from the default to anything else
- Now change the “Source branch” to the branch desired
- The target branch switches to the default branch
What is the current bug behavior?
The target branch selection changes to the default branch if we choose the source branch after.
What is the expected correct behavior?
The target branch selection shouldn't change when we change the source branch.
Relevant logs and/or screenshots
After selecting the target branch:
After selecting the source branch (tager branch changed to main):
Output of checks
This bug appears after v16.6 in self-managed.
This bug happens on GitLab.com
Possible fixes
Choose the source branch before choosing a target branch.

