Reassign notification after Direct Transfer shows wrong hostname

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

Bug: Reassign-Notification after Direct Transfer shows wrong hostname (source instead of target)

Summary

After performing a Direct Transfer (group migration) from the source GitLab instance to the target GitLab instance, the placeholder user reassignment notification displays the wrong hostname.

Instead of showing the target GitLab URL, the notification incorrectly shows the source instance URL.
The reassignment itself is correct — only the hostname in the message is wrong.


Steps to reproduce

  1. Use GitLab EE 18.4 on both instances.
  2. Perform a Direct Transfer of a group from git.source.comgit.destination.com.
  3. Ensure placeholder users are created (members exist on target system).
  4. Enable:
    Admin Area → Settings → Skip confirmation when administrators reassign placeholder users
  5. Reassign placeholder users as admin.
  6. Observe the message or email notification:

You've been reassigned contributions and memberships in Test-Export-Group (/testimport) on https://git.source.com

Expected: https://git.destination.com
Actual: https://git.source.com


Observed behavior

  • The notification uses the source instance hostname (from placeholder metadata).
  • Reassignment is correctly performed on the target instance.
  • Only the displayed hostname is incorrect.
  • This confuses users and looks as if the action happened on the old system.

Expected behavior

  • Notification should use the target system hostname, i.e. the current gitlab_base_url.
  • No reference to the source instance should appear in reassignment messages.

Possible Cause / Notes

  • Placeholder users created by Direct Transfer contain attributes such as
    source_hostname, source_email, and source_user_id.
  • It appears the notification template pulls source_hostname instead of
    the target instance’s base URL.
  • There are GitLab issues discussing placeholder metadata handling,
    but none cover this incorrect hostname in notifications.

Environment

  • GitLab EE 18.4 (Self-Managed)
  • Direct Transfer used
  • Placeholder reassignment with admin bypass enabled
  • Target system already contains matching users

Impact

  • Users are misled into thinking the operation occurred on the old system.
  • Reduces transparency during migration and federation setups.
  • Potentially serious confusion during large-scale migrations.

Request

Please update the notification logic so that:

✔️ The target system hostname is used in reassignment notifications,

not the old source instance hostname.

Thank you!

Edited by 🤖 GitLab Bot 🤖