How to delete the PR analysis from SonarQube dashboard after a certain number of days?

Hi there,
SonarQube 8.9.6 and sonarqube-scanner 4.7.0 are the versions that I’m using.
I am trying to trigger Gerrit pull request analysis on SonarQube by following the instructions on the page https://plugins.jenkins.io/sonar-gerrit/.

We are working on a use case that requires integrating Gerrit with sonarqube via Jenkins. For the same purpose we created a jenkins job that gets triggered as in when a PR is raised on Gerrit.
We are not using pull request decoration, instead we do it via jenkins by modifying the sonar-project.properties.
The sonar Scanner runs the analysis on the patchset and submits report to sonarQube server as Pull-request analysis under a specified branch (Main Branch) as shown :

branches

As more and more PR are piling up We are trying to figure out a way to delete the PR analysis from SonarQube dashboard after a certain number of days.
As per the SonarQube docs, the PR analysis is by default set to get deleted after a period of 30 days, but we wanted to change that to a lesser no , let’s say 3 days.

I have tried adding :
sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs=1
to our sonar-project.properties expecting the PR analysis to get deleted after a day but looks like that did’nt work,
I can still locate the PR on sonar dashboard even after more than 8 days.

Can you please suggest us an alternative solution to the same ?

Hey there.

You can adjust sonar.dbcleaner.daysBeforeDeletingInactiveBranchesAndPRs in the global Administration > Housekeeping. This is the only place you can configure this.

Keep in mind that housekeeping will only occur on a new analysis of a given project.