How to update Bamboo deployment environment notification email address from backend database

Still need help?

The Atlassian Community is here for you.

Ask the community


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

The purpose of this article is to provide a way to update the notification email address of deployment environments from backend database ( this scenario will be applicable when the email update needs to be done in bulk ), please refer Notifications for deployment environments if you wish to update the email from Bamboo GUI.

Environment

Solution applicable for all supported version of Bamboo.

Solution

The details related to email recipients is store in a table called notifications under column recipient. 

This table is internally linked to another table called notification_sets which in turn is linked to build and deployment_environment tables to link this notification to builds or deployments.

1) The first step is to identify the row from deployment_environment table which you wish to modify, for example below query will return details of all the environments with name PROD for which you need to update the notification email recipient address

select notification_set from deployment_environment where name ='PROD'

(info) Please replace the name of deployment environment in the above query. 

2) You can look for the result in notifications table once you have obtained all the notification_set from the previous query

select * from notifications where notification_set=65404929

(info) Please replace notification_set in the above query which is obtained in step 1

3) Last will be the update statement, you can run the update query like below

update notifications set recipient='test@abc.com' where notification_set=65404929

(info) Please replace notification_set in the above query which is obtained in step 1

(info) Please replace recipient with the new email address in the above query 

 Please make sure you have a DB backup in place before you run any update queries, this might be required in case of rollback.
 Kindly make sure to test these update queries in a test environments before running it in production to eliminate any risk of data corruption. 

Last modified on Apr 3, 2023

Was this helpful?

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