Leak Period Report Same As Overall Report

sonarqube
fix_the_leak
new_code

(Sven Myrin) #1

SonarQube Version: 6.7.6

Hello community. I am still new to SQ and could use some help with settings. I have some issues with Leak Period. I am using the default period (version). When I changed the version of our projects, nearly all them started generating a new leak period. However, a few of them showed no change to Bugs, Vulnerabilities, Debt, and Code Smells:

I was expecting the Leak Period report to start at 0’s again. All of our projects were at 1.0 before I updated them to an appropriate version relative to the project. In the image I changed the version from 1.0 to 1.13.0.

Any idea why it is not working for me?


(Julien Lancelot) #2

Hi Sven,

In order for the leak to start from 0, the “New Code Period” should be set to 1.13.
Could you check it’s the case for the project ?
This setting is defined here “” -> “Administration” -> “General settings” -> “New Code Period”.

Regards,
Julien Lancelot


(Sven Myrin) #3

I have it set to 1.13.0. Is that ok or am I not allowed 3 digits?


(Sven Myrin) #4

Update: I changed the code period to two digits and the next build shows a change in the leak period. However, the leak period since now shows the correct three digit version that was not showing before. Bug?


(G Ann Campbell) #5

Hi,

This is not about how many dots there are in your version, but about the string itself. In this case your string changed from “13.0” to “13.0.1” so now the New Code Period (you’re running an older version so it’s still labeled “Leak Period”) is everything since the change.

 
Ann


(Sven Myrin) #6

Thanks for replying Ann. Good to know that the value is a string. However, I still have an issue. I had originally changed the period from 1.0 to 1.13.0 but there was no change visible in the report (see image top of post). That is what I am trying to correct/understand. I set up about 20 projects and three of them have this issue; the period was changed but no change in the UI. The report does seem to notice there was a change (highlighted) but the data should have started from 0. Hope that explains what I am after here :slightly_smiling_face:


(G Ann Campbell) #7

Hi,

Depending on how many intervening analyses there have been this may or may not be helpful, but how about a screenshot from your activity page showing the issues graph and the analyses on the side. Here’s an example of what I’m talking about on the SQ project itself:

 
Ann


(Sven Myrin) #8

See attached screenshots:

So for this project, I changed the period to 8.10.0 on or around January 10th. It was previously 1.0. I was expecting the new leak period to show 0 New Bugs and 0 New Vulnerabilities but that did not happen as you see in the second screenshot.


(G Ann Campbell) #9

Hi,

Thanks for the screenshots. Unfortunately, they confirm to me that your 3 bugs were introduced before the new code period started, so… I’m really not sure where to go from here.

On the topic though of your new code period not resetting when you updated your version I can help. I think earlier in the thread you were advised to update that project setting to a specific version string. That’s why a subsequent version string change didn’t again restart the new code period. If you change that setting (back?) to previous_version, that part should work, and your new code period values should start resetting properly again.

 
Ann


(Sven Myrin) #10

If I change the version it starts to work normally. I will watch this when I change versions again after our release. If the issue recurs, I will revisit this thread. Thanks for all the help.