Invalid new code period with branch reference

We’re using SonarQube EE version 7.9.4 with the following project level settings:

  • “New code period” definition as Reference branch for develop
  • Main branch - develop

The common practice at org is to create pull requests with base develop for anything that needs to go to prod.
So, we started using sonar pull request analysis for pull requests with reference branch as develop, which is working fine.
But for develop branch, we use normal analysis, which is throwing the following error:

Invalid new code period. 'develop' is not one of: integer > 0, date before current analysis j, \"previous_version\", or version string that exists in the project' 
Please contact a project administrator to correct this setting

I found this, but the APIs don’t exist on my server. I found this too, but I’m unable to figure out if it’s supported in my copy of sonarqube.


Welcome to the community!

I’ve just spun up 7.9DE locally & I’m not seeing in it that you can set a reference branch. I hadn’t remembered that you could, but wanted to double check.

Here’s what I’m seeing:

So I believe what’s happening is that analysis is looking for a snapshot (record of a previous analysis) with ‘develop’ as the version stamp.

Sorry, but if you want to use reference branches you’ll need to upgrade.


On that note.
@ganncamp Do you know when is the next LTS release planned?


Is “soon” specific enough? :smiley:

TBH, I can’t give you a date. My personal expectation (which doesn’t necessarily match the party line) is mid/late-Q1 2021.


Works! Thanks for the quick reply! :slight_smile:

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.