Epics should preserve parent-child association during migration
Problem to Solve
With the implementation of the Epic migration MVC, the following Epic attributes are already being migrated:
- title
- description
- state
- createdAt
- closedAt
- startDate
- startDateFixed
- startDateIsFixed
- dueDateFixed
- dueDateIsFixed
- relativePosition
- confidential
This provides the basic info for each Epic, but leaves out any relations, such as Parent Epics, Labels, Comments, etc., which is something that users would expect is included in a full Group Migration.
For the users to confidently use the Group Migration feature, we need to iteratively deliver the import of the remaining Epic data, per this proposal.
Proposed Solution
- Embed the parent epic on the Epic Query
fragment EpicFields on Epic {
title
description
state
create_at: createdAt
closed_at: closedAt
start_date: startDate
start_date_fixed: startDateFixed
start_date_is_fixed: startDateIsFixed
due_date_fixed: dueDateFixed
due_date_is_fixed: dueDateIsFixed
relative_position: relativePosition
confidential
}
query ($full_path: ID!, $cursor: String) {
group(fullPath: $full_path) {
epics(includeDescendantGroups: false, first: 100, after: $cursor) {
pageInfo {
endCursor
hasNextPage
}
nodes {
...EpicFields
parent {
...EpicFields
}
}
}
}
}
- Add a new EpicParentTransformer.
- If
hasParent
-> try to locate it using parent's title/description/createdAt. - If it's located - replace 'parent' key with epic object.
- If not - build a new epic within 'parent' key.
- If
- During saving we might be potentially creating 2 epics, a child and parent at the same time.
Documentation
- User docs: https://docs.gitlab.com/ee/user/group/import/ (WIP)
- Dev docs: https://docs.gitlab.com/ee/development/bulk_import.html
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.