Can't assign SCM abbreviation of a deactivated account to new SonarQube account

Hello,

I’m using version 8.9.1 of the community edition with LDAP. One of our developers had their name changed which means the abbreviation changed which means there’s a new abbreviation in our SCM as well. I told them to login to SonarQube so that the account is updated (or a new one created) so that SonarQube can again properly assign issues. On login SonarQube created a new account. Which means we now had the old account with the old abbreviation and a new account with the new abbreviation. I wanted to add the old SCM abbreviation to the new user so that issues that might be reported on old source code lines still get properly assigned to the correct user. That didn’t work because SonarQube (correctly) reported that the abbreviation is already assigned to a different SonarQube account (the old account). So I deactivated the old SonarQube account (I would have done this anyway because no new issues should be assigned to that account anymore).
However, I still can’t assign the old SCM abbreviation to the new account. I still get the message that it is already assigned to an existing account (the old SonarQube account that I do not even see anymore in the UI).
What should I do? Please advice?

Thanks
Markus

Hi @BrightLight ,

Sorry for the late reply. I can’t reproduce this issue on SonarQube 8.9. On user’s deactivation we remove scm_accounts data from the old user, so this should work.

In case you have access to database could you run the following query, to make sure there is no other left-over users that use the new SCM abbreviation?

select count(*) from users where scm_accounts like '%YOUR_NEW_SCM_ABBREVIATION%'

Thanks for reporting the issue