Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change the key of a sonar project while preserving the analysis history

Tags:

sonarqube

Due to the integration with Eclipse, the project key of my existing Sonar project needs to be changed. I can change the project key in the ant script and trigger a new analysis.

However, Sonar considers it as a new project because the key is different now. This doesn't work for me because my existing project has quite a lot of history information. How can I change the project key while preserving the analysis history? Or, is there a way to merge 2 sonar projects?

like image 633
Mingjiang Shi Avatar asked Mar 20 '12 09:03

Mingjiang Shi


1 Answers

Sonar 3.2+

This is supported since sonar 3.2 (August 2012) from an option in the adminstration.
sonar screenshot

Ticket: http://jira.codehaus.org/browse/SONAR-1608

Older versions

In this feature-request SONAR-2743 you can find a workaround for prior versions, that could work (don't forget to backup you database before even trying).
It requires you to manually execute some sql-statements on the database.

like image 132
oers Avatar answered Oct 22 '22 09:10

oers