Validate branches Cannot Create: This merge request already exists
Summary
Lost new merge request details because there was an error when creating the merge request. There was already another open merge request involving the same branches, but no warning that this would cause an error.
Steps to reproduce
- Create a new merge request from branch A into branch B. Save the merge request.
- Open another new merge request from branch A into branch B, and click the "Submit merge request" button to save.
- You are taken to the first New Merge Request page with an error message.
The error says:
The form contains the following error:
* Validate branches Cannot Create: This merge request already exists: ["WIP: Workflow"]
Example Project
What is the current bug behavior?
The merge request isn't created, and there is no way to retrieve the details entered for it.
What is the expected correct behavior?
You shouldn't be able to create a duplicate MR. But if you do and you get the error, you should be able to view the details of the merge request.
Relevant logs and/or screenshots
(Paste any relevant logs - please use code blocks (```) to format console output, logs, and code as it's very hard to read otherwise.)
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:env:info
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
)
Results of GitLab application Check
Expand for output related to the GitLab application check
(For installations with omnibus-gitlab package run and paste the output of:
sudo gitlab-rake gitlab:check SANITIZE=true
)(For installations from source run and paste the output of:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production SANITIZE=true
)(we will only investigate if the tests are passing)
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)