Unable to add previously deleted project/repo to same Org

I am the Admin of two SonarCloud Orgs, though this situation is relevant to only one of them. I recently deleted a project linked to one of our Bitbucket repos to troubleshoot an issue we were seeing in one of our pipelines. When I try to add the project back via “Analyze new project,” the project still shows as “already imported.” I cannot find the project in my projects list, nor in the other Org I admin. I thought maybe it was a sync/delay issue, but it’s been a couple days now and I still have the problem.

Hi,

Are you comfortable sharing the details publicly?

 
Ann

Hello, Ann! I would prefer to keep them private. Thank you.

Hi,

No problem. I’ve flagged this for the team.

 
Ann

My issue has been resolved. The root cause was that a repository in Bitbucket had been renamed (unbeknownst to me), and the project existed in SonarCloud under the original name. So trying to add a new project referencing the same repo obviously wouldn’t work. This is why the repo showed “already imported” as well. Removing the project by the original name allowed us to re-add the repository back in with the new name.

2 Likes