Renaming a user has created a new account without any history associated with it.


Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Renaming a user in Bitbucket Server for the purpose of migrating them to a different external directory with different naming conventions, has resulted in creating a new account without any of the history and metadata associated with the user. (No ssh keys, pull requests, etc.)

Cause

Migration of users to different directories, while possible, is not yet built in (BSERV-5195). As a result, migrations can sometimes cause users to lose their history.  

Workaround

Should this scenario occur, there is a way to associate the history of the old username with the new one. Note that this should be done shortly after the issue is experienced in order to avoid any history/actions becoming associated with the new username.

The scenario assumes the following:

  • new_username exists in new directory connector
  • old_username exists in old directory connector (or internal)

1. Create a user in the internal directory with the username of the archived user "old_username"
2. Disable the new user directory temporarily
3. Delete any remaining users in Bitbucket with the name "new_username"
4. Rename the user "old_username" to "new_username" in the internal directory
5. Re-enable the new user directory

(warning)  Note: Archived users can sometimes be denoted in the UI as old_username_ar.



DescriptionHistory of renamed users
ProductBitbucket Server
Last modified on Jun 4, 2019

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.