Add alert with info on placeholder users to Direct transfer history page
Problem
Ideally, after the import, all contributions are reassigned from placeholder users to real users or they are kept with placeholders ("Keep as placeholder"/"Don't reassign" action), so that the tab "Awaiting reassignment" has no items listed.
Group owners might not remember that there are still placeholders left to reassign.
Proposed solution
Create a banner on the DT history page, /import/bulk_imports/ID/history
(history page for the single bulk import) and list there unique (true) top-level namespaces that still have pending assignments.
The top-most history page doesn't have any banner at all.
Banner
Blue info banner as visible in design here, but no table and different title and text.
Blue info banner with title "Placeholder users awaiting reassignment"
and text:
"As part of the import, placeholder users were created on {Imported top level group 1}, {Imported top level group 2} and {Imported top level group 3} and these users were assigned group membership and contributions from {source hostname}. To reassign contributions from placeholder users to GitLab users, visit the Members page of Imported top level group 1, Imported top level group 2 and Imported top level group 3.
Button: "Learn more" should link to https://docs.gitlab.com/ee/user/project/import/#placeholder-users.
** If we could have links here to members page of each group, that would be nice: "Members page of Imported top level group 1, Imported top level group 2 and Imported top level group 3"
Technical proposal
Based on #467369 (comment 1994094031)
- Migrate a new boolean to
BulkImports::Entity
to record which entities are part of the initial entities created. - Within the controller for the Direct Transfer migration history, collect those and determine their root namespaces (perhaps just by calling
#root_ancestor
on each, unless there is a more performant way). - Filter the unique root namespaces based on a permission check, so users only see the information if they have the required permission to take that action on it.
- Return that a banner for the frontend.