Importing a GitLab export reopened all the merge requests
Summary
I exported a GitLab project with a number of merged MRs, then imported it to a different group. On import, all the MRs that were merged in the old project became open (and assigned to me \o/) in the created project.
Steps to reproduce
- Create a project
- Create an MR in project
- Merge MR
- Export project
- Import project
- Observe MR state in imported project
(I haven't actually tried to replicate this, but I imagine that's sufficient).
Example Project
- Original project: https://gitlab.com/fabiopitino/gitlab-jenkinsfile-runner
- Imported project: https://gitlab.com/gitlab-org/sandbox/jfr-container-builder/-/merge_requests
As a cleanup, I closed all the merge requests in the new one, but they were open, I promise.
(If possible, please create an example project here on GitLab.com that exhibits the problematic behavior, and link to it here in the bug report)
(If you are using an older version of GitLab, this will also determine whether the bug is fixed in a more recent version)
What is the current bug behavior?
MRs transition from merged to open
What is the expected correct behavior?
MRs should retain their merged state
Output of checks
This bug happens on GitLab.com
Possible fixes
(If you can, link to the line of code that might be responsible for the problem)