How to see issue per version in a sonarqube project?

Hello,

  • We are using SonarQube version 7.3 - community edition
  • And want to know if its possible to see details of issues per SonarQube project version.
  • Example, if there is a new version created at every analysis, 1.0, 2.0… - then how can we see what are the issues associated with version 2.0, or version 3.0 etc. As of now, I am able to only see the issues in latest project version.

Hi,

You can get issue counts across various axes (type, severity, status, …) for previous analyses, but not issue details. We only keep current status on that.

 
Ann

Thanks Ann. Is it possible to get the count of issue types per severity through WEB API. Example, if I want to list the count of Critical Bugs or Major Vulnerabilities, how can we do so ?

I am only able to get the count for any one of these facets at a time.
api/issues/search?facets=types,severities&componentKeys=&facetMode=count

Hi,

Are you still looking for historical data, or current values? For current values, you’re using the right service, but facets isn’t really the way to go. Instead, query granularly for what you want, e.g.

?types=BUG&severities=CRITICAL

(note that you’ll probably need a couple other key/value pairs to make the query work right).

 
HTH,
Ann

1 Like

Thanks Ann, I was able to get the query and make it work. I am getting the total count of what is needed.
Thanks a lot :slight_smile:

The way of Ann told is out of date. As least for Version 7.9.4, it’s useless.
One can get the issue count according to severities with these parameters, like:
https://testsonar.lordjesus.org/api/issues/search?facets=severities&ps=1&componentKeys=org.lordjesus.service:storefront&types=BUG&resolved=false

The document of the API is not very clear, it’s better to check the browser calling when a Sonar link is clicked.

You can give me a example for severity?
thanks