Search code examples
sonarqube

How to delete an issue in SonarQube Database?


SonarQube only provide a configuration to delete all closed issues. Is that a possible to delete a certain issue in sonar database?

And how to make sure the amount of the issues under Resolution in SonarQube UI under tab Issues will be changed after deleted? (I tried to delete some record in sonar table "issues", but the amount of the issues wasn't change)

Please help provide the sql to delete certain issue. Thanks!


Thanks n_stan's reply! This idea is raised by a strange problem that I found in SonarQube. Fixed issues shows under Unresolved. Click me to see the screenshots


Solution

  • There's hardly any good reason for going and deleting things directly in the database (that would be asking for problems further down the road).

    Issues can be resolved for good by marking either as False Positive or Won't Fix. See documentation Reviewing Issues and Issue Lifecycle.