feat: add new project and group importer for organizations #3598
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
General Checklist
Database Migrations
This adds a new query and mutation for helping with importing a project, and all associated groups into an organization.
The new query is called
checkBulkImportProjectsAndGroupsToOrganization
and it will return lists of all the projects and groups that would be imported into the organization. The payload allows an administrator to verify that the correct projects and groups would be imported. Giving the administrator time to verify the imported projects and groups and either remove, or add anything that may be missing, then run the query again.This query also returns a second list of projects and groups, but it will contain anything in there that indicates a project or group has already been moved into a completely different organization, which would result in the import failing.
The new mutation is called
bulkImportProjectsAndGroupsToOrganization
and will perform the changes thatcheckBulkImportProjectsAndGroupsToOrganization
outputs. There is the option of also detaching all notifications from all projects within the import. Otherwise existing notifications will remain attached to the projects, but the organization owners will only ever be able to remove these from their projects, because the main notification object will be owned by the platform (the way notifications always were before). The platform defined notifcations themselves will NOT be imported, as there could be the possibility that this is shared across multiple organizations, which is not supported by the organization model.It marks all the previous importing queries and mutations as deprecated, and their usage is discouraged.