Skip to content

User mapping - Fix keep as placeholder flow

What does this MR do and why?

This applies a partial rollback of a recent change specific to placeholder_actions. In the placeholders UI, the actions component is the drop down list and button seen in each table row.

The placeholder actions should infact trigger a refetch of the importSourceUsers query after the button is clicked if there is no user selected. This represents the case where "Don't reassign" was clicked (i.e. that user row is to be kept as a placeholder). After a user is kept as placeholder, the user should appear in the "Reassigned" tab without having to refresh the page.

In order words, the MR ensures that after admin chooses to not reassign a particular user in the Awaiting tab, that user appears in the Reassigned tab immediately.

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
Today-BeforeFix.mov Today-AfterFix.mov

How to set up and validate locally

Assumes you are setup to view the placeholder users section

  1. Navigate to /groups/<your group>/-/group_members?tab=placeholders to the placeholders table component
  2. Select a row and click into the drop down (under 'Reassign placeholder to')
  3. Click "don't reassign" then click confirm
  4. Click on the "Reassigned" tab. You should see that user

Steps to view placeholder users, before the above

  1. Enable the feature flags for user contribution mapping: importer_user_mapping and bulk_import_importer_user_mapping
  2. Log into the localhost UI and look for one of your top-level groups on /dashboard/groups and note that group's id.
  3. In your local database client, you'll need records in the import_source_users table. There is an unmerged branch with a rake task for creating dummy records.
  4. Checkout the unmerged branch and follow the instructions in this file https://gitlab.com/gitlab-org/gitlab/-/blob/seed-placeholder-users-task/lib/tasks/gitlab/seed/placeholder_users.rake . Replace "22" with your chosen group id before running the task.
  5. Verify that there are records in the Import::SourceUser table
  6. Navigate to /groups/<your-group-name>/-/group_members?tab=placeholders. For example I would go to 127.0.0.1:3000/groups/flightjs/-/group_members?tab=placeholders

Related to #499340 (closed)

Edited by Oiza Baiye

Merge request reports

Loading