include the user information of past users when exporting a project

Everyone can contribute. Help move this issue forward while earning points, leveling up and collecting rewards.

  • Close this issue

Problem to solve

When exporting a project with user contribution belonging to past users (no longer members of the project but still existing on the server) there is no information in generated archive allowing to map those contribution to users on the importing instance.

Intended users

Administrators moving projects to new GitLab instance.

Further details

See support request (116188) where the issue was reproducible and confirmed.

Steps to reproduce:

  • create a Project
  • add two members
  • create an issue for each of the members as assigne
  • create a merge requests for each issue created and assigned to the member assigned to the corresponding issue
  • add sone stuff to the mr and merge them
  • Close the issues
  • remove one member
  • export the project
  • on a new instance, create the two users with same und and Email
  • import the Projects using a third admin member
  • check whether contributions of the removed member are still assigned to that member

Cause: only the username and mail of current members are stored in the exported project.json

Proposal

In the currently generate project.json file there is a list of project_members. My proposal generate a users-list with same content as the project_members-list but include all users on the server (or may be only those who are having contributions in the projects no matter the are project members or not). Reduce the user information in the "project_members"-list to the user-id and let the importer do the same look up on the users-list as it does today for merge requests and issues an the project_members-list to map the users to the importing instance.

Permissions and Security

No change required.

Documentation

Testing

See steps to reproduce. A test case might just compare the database content of two separate gitlab databases.

What does success look like, and how can we measure that?

When exporting a project containing contributions of non-members which are still having an account and importing the project on a new instance with the same users but different ids, all contributions should be mapped to the same users.

Also see steps to reproduce.

Links / references

Edited Jul 29, 2025 by 🤖 GitLab Bot 🤖
Assignee Loading
Time tracking Loading