"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

I think you were right about some points you made. Here is where I think we’re at. Some overlap with what you theorized before, but wanted a summary:

After continued investigation and comparison between our repo1 and others (repo2, repo3), I believe the inconsistent PR decoration and missing “Fixed issues” metric are due to timing and coverage analysis differences:

  1. The repo1 runs SonarQube analysis on main at most once per day (if there were changes), while developers may commit to main multiple times throughout the day.
  2. PR analysis for repo1 does not include test execution (for speed), but main branch analysis does run tests to gather coverage and duplication data.
  3. Other repos like repo2 and repo3 never run tests (no coverage/duplication), and they analyze main branch immediately after new commits, keeping PRs and main branch closely aligned.

Theories (now likely confirmed):

  • If a PR is analyzed before the latest analysis of main completes, SonarQube lacks a proper baseline for comparison, leading to the “not available” symbol for Fixed issues and missing metrics.
  • This affects repo1 more visibly because it actually performs coverage and duplication analysis (as opposed to always reporting 0 like other repos).

PRs and SQ WebUI are seeing the same issue manifested in their own unique ways, but definitely linked.

1 Like

I have run multiple tests now. I have the branch based on the main branch ref with our last SQ run on main. I have introduced multiple issues and fixed them. I can see those showing up as fixed on the issues tab. Not on the overview tab.
I fixed two issues seen on main branch, on my new branch, but they do not show up as fixed on the Issues tab or the Overview tab. I see them on the code tab as modified code, but that’s it. Something is not quite right here. The overview tab should not still be showing the “none” symbol (circle with a line through it).

Hi,

Is this in

?

Because I believe that’s at the root.

 
Ann

Yes, ma’am. It is repo1. Repo1 SQ analysis is run once per day. It was run on main again today (4:46 AM EDT). My branch is in sync with the main branch SQ run from yesterday (29th), still. I have not refreshed from main to sync up with today’s SQ run.

1 Like

Hi,

Can you try this with everything up to date?

 
Thx,
Ann

1 Like

Yep, I’ll give it a try now.

Updated SQ to the latest LTS 2025-2.0.
Updated Jenkins plugin tot he latest (we run “main” branch analysis via Jenkins) and re-ran on main.
Refreshed my branch from main to be at the same base.
Updated our github action to the latest SQ action and re-ran the analysis.
Same result. :cry:

Hi,

I’m going to flag this for more expert eyes.

 
Ann

1 Like

Any word from the more expert eye’s mouths? :slight_smile:

Hi,

Hopefully they’ll be along soon.

 
Ann

Hi @kerrhome

Could you confirm:

  • The issues that you fixed in PR are reported in the reference branch - they exist as SQ issues
  • Once the issues are fixed in the PR, you can see the number on the ‘Issues’ page corresponding to the number of actually fixed issues
  • Eventually you don’t see any correlation with the reference branch being freshly analyzed or not

Also, were you able to find any configuration differences between ‘working’ and ‘not-working’ projects?
And, what ‘Fixed issues’ number do you see in the PR decoration?

Anita

Hi @Anita,

Thanks for following up. Here’s the info you requested:

  • Fixed issues in reference branch: Yes, the issues fixed in the PR exist as SonarQube issues on the main branch (confirmed in tests where I introduced and fixed issues).
  • Issues page count: The ‘Issues’ page shows the correct number of fixed issues (e.g., 2 when I click “All” issues).
  • Reference branch analysis timing: No correlation with whether main is freshly analyzed. I updated everything (SQ to LTS 2025-2.0, Jenkins plugin, GitHub action, and synced my branch with main’s latest analysis), but the issue persists.
  • Config differences: Repo1 (affected) runs main branch analysis once daily and skips tests in PRs for speed, but includes them in main for coverage/duplication. Repo2/3 do not run tests and analyze main right after commits, keeping PRs and main aligned.
  • PR decoration: Never shows the Fixed Issues line or value. I’ll provide an example where I fixed two issues created within the branch as well as 2 issues that existed on main before my branch. So, I’ve fixed at least 4 issues, but only 2 are reflected and only on the issues tab on the SQ web ui (never on the PR):


Thanks!

Any news for us? :slight_smile: