Import/Export - Protected Branch: Settings not migrated properly
Sometimes when using Project Import the protected branches are not imported as expected, due to the validation error:
ProtectedBranch::MergeAccessLevel#project delegated to protected_branch.project, but protected_branch is nil: #<ProtectedBranch::MergeAccessLevel id: nil, protected_branch_id: nil, access_level: 40, created_at: \"2022-11-24 03:27:59.574000000 +0000\"
Steps to reproduce:
- Create a project
- Create a few project members
- Create protected branches with both role and users assigned
- Export project and import it to a new destination
- Observe not all protected branches are migrated
Edited by George Koltsov