Skip to content

Add table and model to enable post-import contribution assignments

Luke Duncalfe requested to merge 443554-table-to-support-user-reassignment into master

What does this MR do and why?

This MR add the table and model for post-import contribution assignments #443554 (closed).

During an import that uses the improved user mapping from &12378, initially, the users associated with the imported data are "placeholder" users (a kind of internal user) rather than real users.

The placeholder user is recorded in Import::SourceUser#placeholder_user

Later the Import::SourceUser is assigned a real user, the Import::SourceUser#assigned_to_user, after they have accepted an invitation. At this point, we should change all imported data from being associated with the placeholder_user to the (real) assigned_to_user.

The table added in this MR will store the details of what imported data should be updated.

The model and column values we save will be treated as aliases to the real things in Add aliasing for table of placeholder contribut... (#467522 - closed).

Design

Examples of data:

Name Value
model IssueAssignee
column user_id
find_by_composite { user_id: 1, issue_id: 1 }
find_by_id
namespace_id 1
source_user_id 1
Name Value
model Note
column author_id
find_by_composite
find_by_id 1
namespace_id 1
source_user_id 1

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.

Related to #443554 (closed)

Edited by Luke Duncalfe

Merge request reports

Loading