Bitbucket Sonar Statistics dialog doesn't work after using Reference Branches

SonarQube version: Enterprise Edition, 9.9.1 (build 69595)
Bitbucket SonarQube plugin version: 3.0.4

SonarQube is deployed through a Cake script run by Jenkins.

After we switched to using Reference Branches for New Code on SonarQube, the Sonar Statistics dialog (when clicking on “Quality gates passed” on Bitbucket), always says “Sonar data unavailable”. This is strange, because other aspects of PR decoration are present (annotations in the diff, and it says whether the quality gates passed or not.)

I have verified that all the things listed in the dialog are okay:

  • The PR has been analyzed by SonarQube (a report is present on the SonarQube server.)
  • The Sonar project exists
  • We use the commercial branching feature and have “Use new Sonar branching and pull request support” enabled in our Bitbucket settings
  • SonarQube has not been upgraded recently. Other repositories on Bitbucket do not have the problem we do, and I noticed that they use the “Previous Version” setting for New Code.

I have also tried fiddling around with repository settings on Bitbucket to no avail. Is there some setting that we need to change to fix this?

Hey there.

What plugin is this? I don’t think it’s created by us.

If the missing dialog is found from Include Code Quality for Bitbucket | Atlassian Marketplace – you should reach out to the maintainers of the integration. It’s another vendor.

It’s the App version shown when I go to the Sonar tab in the Bitbucket repository settings.

It looks like that is the plugin that we use in Bitbucket for Sonar. I’ll reach out to the developers. Thanks!

1 Like