Import/Export New models and milestones errors while importing
Created from https://gitlab.com/gitlab-org/gitlab-ce/issues/21295#note_15998801
- We don't cope very well with 1 to 1 relations straight from project -
project_feature
is part of the params in the project initializer when it should be treated as a separate model and update theproject
later. - Milestones and possibly labels require a certain order in order to get imported correctly. The following scenario may happen:
- Exported project that contains milestones associated to an issue and also unassigned milestones
- Unassigned milestones are then created successfully
- Assigned milestones get created, but then they fail when the milestone attempts to get assigned to a project once again
This will be fixed if we first create all the milestones, then for issues/MRs we assign the already created milestones (instead of the other way around)