Rename project keeping history

Hi,

Does anyone knows how to rename project, but keeping history?
Just renaming name for sonar scanner is not doing the job,
as it is creating new project with the name, but the old one contains the history.

Questions related, but not answering the question:
Change a project name is not working - SonarQube - Sonar Community (sonarsource.com)
Rename project name in SonarCloud - SonarCloud - Sonar Community (sonarsource.com)

Regards,
Seweryn.

Take a look at the documentation on Updating the Project Key.

Hi,

Thanks a lot for the proposal, but this is not what we want to do.
Changing the key does not rename the project.

BR,
Seweryn.

If you want to change the name and not the key (often users do both), you’ll need to pass a new sonar.projectName to the scanner and analyze the main branch.

Hi,

This is correct, but this does not keep history, it simple creates new project, but then the history is lost.

Regards,
Seweryn.

Changing sonar.projectKey without first updating the key in the UI will result in a new project being made. Changing sonar.projectName does not have that effect.

1 Like

Hi,

OK. Thanks a lot for the hint!

BR,
Seweryn.