hipchat email -r doesn't reset the email of the group owner. Instead, it resets the email of the user with id=1.
While the owner has id=1 by default, this command will not work properly in environments where the owner has been changed to a user with a different id.
- Login as a group owner, say email@example.com which should have id=1
- Follow How to identify and change the Owner user in HipChat Server to transfer the ownership to another user, say firstname.lastname@example.org
- Run hipchat service -r email@example.com to change the email address of the new owner from firstname.lastname@example.org to email@example.com
The user email firstname.lastname@example.org is changed to email@example.com
The user email firstname.lastname@example.org (id=1) will be changed to email@example.com
Here's the function to fix in /opt/atlassian/hipchat/sbin/MyMySQL.py
The group owner should be pulled from the group acl in the DB
Reach out to the HipChat Support team to change the owner via a DB command.