Uploaded image for project: 'HipChat'
  1. HipChat
  2. HCPUB-3079

hipchat service -r doesn't reset the owner's email

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more


    • Severity 3 - Minor


      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.

      Steps to Reproduce

      1. Login as a group owner, say owner.1@example.com which should have id=1
      2. Follow How to identify and change the Owner user in HipChat Server to transfer the ownership to another user, say owner.2@example.com
      3. Run hipchat service -r new.owner@example.com to change the email address of the new owner from owner.2@example.com to new.owner@example.com

      Expected Results

      The user email owner.2@example.com is changed to new.owner@example.com

      Actual Results

      The user email owner.1@example.com (id=1) will be changed to new.owner@example.com


      Here's the function to fix in /opt/atlassian/hipchat/sbin/MyMySQL.py

          def reset_owner_email(self, email):
              self.update_table('users', 'set email="{}" where id=1'.format(email))
              self.update_table('users', 'set is_deleted=0 where id=1')

      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.

            rberrelleza Ramiro Berrelleza (Inactive)
            adridi Arbi Dridi
            mandreacchio Michael Andreacchio