"Fixed Issues" Metric Shows "Not Available" Symbol for All PRs in One Project

  • SonarQube Server Developer Edition v10.8.1 (101195), GitHub Action sonarsource/sonarqube-scan-action@v5.0.0
  • SonarQube Deployed: Docker
  • Trying to achieve: some valid values for this field.
  • Tried so far: Just to understand the issue.

In at least one project, the SonarQube “Fixed Issues” metric for all PRs displays a “not available” symbol (circle with a diagonal line) instead of a value like “0” or an integer, as seen in other projects. The page source code has a label defined: “No measure value for Pull request fixed issues.” This issue persists across all branches in this project, while other projects consistently show expected values. What could be causing this, and how can we resolve it?

Hi,

Since you’re on an EOL version (2025.1 is both the current LTA and the Latest version at the moment) I may need you to upgrade before we can go deep (if necessary).

When you check the Issues page for one of these PRs, what do you see in the Status facet? (To be honest, I’m straw-grasping with this question.)

 
Ann

1 Like

Thanks, I’ll look to upgrade tonight or tomorrow. Here is what I see on one of the PRs:

Update complete. We are now on 2025.1.1. I looked at a different PR and here is what I see:


and

which is odd because the status says we have 2 fixed issues, but still see that symbol on the overview tab.

Hi,

Thanks for doing the upgrade.

I’ve spent some time poking at this in the interim. I don’t like the answers I have for you.

  • If you go to a PRs Issues page and filter by Fixed, what you will get is the issues first introduced in that PR, and then corrected in the PR.

  • To get to the list of pre-existing issues fixed by a PR, you must click the link either in the PR decoration comment or on the PR homepage. That will land you in the PR’s target branch, where there’s some slight-of-hand going on in the background to show you the issues that would be Fixed by merging the PR.

Given that, your ‘not available’ symbols in the PR decoration lead me to believe that there’s a problem with Analysis’ understanding of the target branch. Is it under analysis? Were the prerequisites in place when the PR was analyzed?

 
Ann

Thanks for the guidance. When I’m on the PR’s Issues page, if I click on “All” for all issues, I see the number of Fixed is 2. If I click on “My Issues”, I see the following:


Notice that 3 of the lines are gray, including the “Fixed”, which also shows “0”. If you hover your mouse over that line, you see a “not available” sign in gray pop up. Interesting.

As far as viewing the branch, not the PR, I do not see a way to do that. All of my links are to the PR. Also, I checked the branch listing for this project in the SQ UI and I only see one branch listed there: “master”.

I wonder if this could be because this was an old SQ project, before the GitHub PR integration, that was converted to a GitHub Integration? Does that make sense? We’ve had it a while and in the last 6-12 months when we upgraded our SQ instance, we decided to move to using the GitHub integration (our GitHub is also on prem). Some projects were created new, but projects with a lot of data were just converted to use the GitHub Integration.

Regarding your question about the prereqs, I believe they are. We don’t explicitly set the branch name, but it should be derived from the environment. Here is that section of the GitHub workflow:

      - name: Run SonarQube Checks
        uses: sonarsource/sonarqube-scan-action@v5.0.0
        env:
          SONAR_HOST_URL: ${{ vars.SONAR_HOST_URL }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
          SONAR_ROOT_CERT: ${{ secrets.CERT_CHAIN }}
          SONAR_USER_HOME: ${{ env.SONAR_RUNNER_HOME }}/.sonar
        with:
          args: >
            -Dsonar.projectKey=web
            -Dsonar.sources=modules,report-templates,scripts
            -Dsonar.exclusions=web/js/**web/css/**
            -Dsonar.tests=tests,tests_functional
            -Dsonar.scm.provider=git
            -Dsonar.python.version=3.6

I will check to see if our projects that were created as a GitHub Integration have any differences.

Update: I checked and I see “not available” for some projects that I know were created as GitHub Integration projects.

Hi,

Again, these are issues initially raised in the PR and then corrected before (any potential) merge.

Well, ‘My Issues’ are issues assigned to you, so I’m not necessarily shocked you see no issues here.

What I’m saying is that the branch is where you land when you click on Fixed from the PR homepage and/or the PR decoration. There’s no other good way to navigate to it in the UI.

Okay… and what branch to your PRs target?

The analysis method should be entirely unrelated.

 
Ann