New code period reset when merging reference branch into feature branch

In my company we use the last LTS of SonarQube (8.9.0). We have set the new code period of every branch as the difference between the branch and the reference branch (our “master”). We also have the practice to automatically merge master into the open feature branch any time a new PR occurs (I am not pretty sure that’s a best practice…however they are doing so…). Doing this, we noticed that any time we merge the master on one branch Sonar resets the new code period of that branch. Essentially ignoring all the new branch code written before that merge. Is that a bug or are we missing something in the configuration?

Hi @Brasco,

Welcome to the community!

It seems you are hitting a limitation we currently have with this kind of workflow.
I invite you to follow the corresponding ticket:


Thank you!