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 firstname.lastname@example.org 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 email@example.com
- Run hipchat service -r firstname.lastname@example.org to change the email address of the new owner from email@example.com to firstname.lastname@example.org
The user email email@example.com is changed to firstname.lastname@example.org
The user email email@example.com (id=1) will be changed to firstname.lastname@example.org
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.