Skip resolved_by validation on importing records

What does this MR do and why?

Skip resolved_by validation on importing records

A user on a GitLab instance can resolve a note and subsequently be deleted. This results in a note with a resolved_at date, but no corresponding user.

This note is then imported into other GitLab instances with resolved_at intact but no resolved_by_id. This fails validation, and the notes fail to import.

Since the invalid note is allowed on the source system, i.e. nothing prevents us from deleting users and leaving "orphaned" resolved notes, I think it makes sense to skip the validation on import.

References

Screenshots or screen recordings

Source:

CleanShot_2025-05-02_at_16.09.51_2x

Destination:

Before After
CleanShot_2025-05-02_at_16.15.14_2x CleanShot_2025-05-02_at_16.18.43_2x

How to set up and validate locally

  1. Create a group, and create a project within that group.
  2. Create an issue in the project.
  3. Create and resolve a discussion.
  4. Delete the user that resolved the discussion.
  5. Import the group into another using Direct Transfer.
  6. Observe the successfully imported note and lack of errors.

MR acceptance checklist

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

Edited by James Nutt

Merge request reports

Loading