How to change the author name or author email that is displayed in Bamboo
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
Summary
Whenever a build is run, Bamboo displays Author name and Author email address of the respective commit associated with the build in some places like the Build summary section, Authors details, author statistics, and code check-in comments section. For some reason, if this author name is wrong and needs to be changed, it is necessary to alter it in the client machine via git config. This change does not reflect in the existing build result summary pages. We will need to alter this in the database directly.
Solution:
Bamboo extracts the author name and email address from the linked repository where 'Author name' is mentioned and displays under Authors page.
For instance, in the below commit, John Doe is the Author name and john@doe.com is the author email.
$ git log commit d5899b77ec5fc95823fc8a1c10c742ceec0abd3a (HEAD -> master) Author: John Doe <john@doe.org> Date: Tue Sep 8 18:51:57 2020 +0200 my first commit
If you want to change this, the respective user who made this commit needs to run the below command to verify if they still see their credentials there:
$ git config --global --list
If it reveals the same, they'd have to change it like below to prevent any new commits to have this entry:
$ git config --global user.name "John Doe Smith" $ git config --global user.email "johnsmith@doe.org"
As the author details, author statistics, and code check-in comments will still display this information in Bamboo, we have to modify directly on the database after ensuring that the end-user has modified at their end.
You may run a query like below after taking database backup when Bamboo is down:
UPDATE author SET author_email = '<new-author-email>' WHERE author_email = 'old';
UPDATE author SET author_name = '<new author name>' WHERE author_email = '<old>'
Start Bamboo and check the respective build to verify if the changes we have made in the database are reflected.