Leak Period Baseline is not working as expected


(Fanny Tan) #1


I am using Sonarqube 6.7.1

I set leak period using BASELINE version in 8 Oct. Turn out, one of my project is not set any version. When I analyze the project after I set BASELINE version manually from Activity tab, it still consider part of BASELINE version (15 Oct).

So I change BASELINE version back to previous analysis manually (back to 8 Oct), and add new version (15 Oct, 5.0.0) in latest analysis. I even set the new version (5.0.0) in my project. I do analyze several times and the result is not as expected. The Leak period started on 22 Oct. Here a picture of the result today.

Why is like that? How can I make 8 Oct as my BASELINE version again?

(FYI, I change BASELINE version of my other project after it is analyzed several times, and it counts the leak period just fine)

Thank you

(G Ann Campbell) #2


Does this mean you set that globally?

It isn’t clear to me what you mean here

To make sure I understand:

  • you had previously set a Version event on a different analysis
  • you edited that other analysis to remove the BASELINE version event
  • you manually set a version event on 8 Oct to BASELINE
  • you manually set a version event on 15 Oct to 5.0.0


Just to eliminate the possibility, can you send a screenshot of your project-level New Code period?

Well if we can’t get the BASELINE version figured out, as a last resort there’s always the option of using a date.


(Fanny Tan) #3

Okay, I will try to explain step by step:

  1. On Oct 8, I set Oct 8 as my BASELINE version.
  2. On Oct 15, turn out, version is still BASELINE, so my BASELINE version change to Oct 15. In this step, I change version event on Oct 15 to 5.0.0, then add new Version event on Oct 8 as BASELINE.
  3. On 22 Oct sonar analyzed the project again and the BASELINE started on 22 Oct, even though version event of BASELINE is on 8 Oct.
  4. On 29 Oct sonar analyzed the project again and the BASELINE still started on 22 Oct.

I am still trying to figuring out, because this is happening to two of my project and Ishould give a proper answer to my manager before I change leak period to “date”.

Thank you for helping me. Hope this time I explain it well.

(G Ann Campbell) #4


It sounds like your analysis properties include sonar.version=BASELINE…? If so, then you’re getting the expected behavior and need to update your properties. If you have two non-contiguous analyses with the same version string, the later one will be used for the purpose of New Code calculation.