Skip to content

Create members for reassigned users in Direct Transfer

What does this MR do and why?

This changes updates Direct Transfer to create members for users who have already accepted the reassignment. Besides, it uses the MembersPipeline to create Import::SourceUser and placeholder users for every user that is a member of the source entity.

Such change is behind the feature flags: importer_user_mapping and bulk_import_importer_user_mapping

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

  1. Enable the feature flags bulk_import_importer_user_mapping and importer_user_mapping
  2. Import a group using Direct Transfer
  3. Go to new group
  4. Import group
  5. Provide the source instance URL and access token
  6. Select a group to migrate. Make sure the group has a couple of members
  7. Wait for the migration to finish
  8. Check the members' page of the migrated group and project. Only the user that triggered the migration should be a member.
  9. Access the list of Import::SourceUsers/Placeholder users of the top-level namespace where the group was migrated
  10. Go to the top-level namespace
  11. Click on the menu item Members in the sidebar
  12. Click on the tab Placeholder Users
  13. Check if an Import::SourceUsers/Placeholder user was created for each member in the source instance.
  14. Reassign a placeholder user to a real user
  15. Select a user in the dropdown
  16. Press the reassign button
  17. Login as the selected user
  18. Open Letter Opener - http://gdk.test:3000/rails/letter_opener
  19. Search for the reassignment email and follow the steps to accept the reassignment
  20. Trigger another migration and check if, this time, a membership was created for the user who accepted the reassignment.

Merge request reports