Add Group Import functionality
What does this MR do?
This MR adds GroupTreeRestorer and everything needed to run Group Import process.
- GroupImportWorker
- GroupImportService
- GroupTreeRestorer
- GroupRelationFactory
- GroupObjectBuilder
To test the functionality you need to perform export and import process:
-
Create a group with labels/milestones/epics/subgroups
$ rails console
group_id = 1305
user_id = 1
# Export
GroupExportWorker.new.perform(user_id, group_id)
filepath = Group.find(group_id).import_export_upload.export_file.file.file
# Import
name = FFaker::Lorem.characters(25)
params = {
name: name,
path: name,
import_export_upload: ImportExportUpload.new(import_file: File.open(filepath))
}
group = ::Groups::CreateService.new(User.find(user_id), params).execute
GroupImportWorker.new.perform(user_id, group.id)
- Verify new imported group that it is identical to the original
Screenshots
N/A
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
N/A
Security
N/A
Edited by 🤖 GitLab Bot 🤖