0

I have realized SonarQube shows issue status as fixed when the codebase which resulted in the analysis is no longer available.

Is there any possibility to remove these fixed issues from SonarQube UI as when I am doing an API call to fetch the issues, these fixed issues are coming along with open one's and the number of issues is crossing 10k limit and am not able to fetch the relevant open issues through my API call.

agabrys
  • 8,728
  • 3
  • 35
  • 73
  • 1
    why don't you connect via DB? we do that at work (I know, not the best practice) but it works great :) – Mr.P Jan 19 '21 at 06:44
  • Not evryone has access to DB..I wanted to ask is there any way these irrelevant issues cant be removed from sonar UI as they are not part of the code anymore after the fresh analysis – Padmapriya Kp Jan 19 '21 at 07:18
  • afaik, you cannot remove them from the UI .. it's just a presentation layer ... you would have to submit a new version of your code to remove those from the report – Mr.P Jan 19 '21 at 10:13

1 Answers1

1

The closed issues are automatically removed after X days (by default 30). The configuration option is in the Administration → General → Database Cleaner → Delete closed issues after. Read more: Housekeeping.

If you use API to fetch a list of the issues, you should filter the results. For example the api/issues/search service provides the statuses parameter which takes a comma-separated list of statuses. Possible values:

  • OPEN
  • CONFIRMED
  • REOPENED
  • RESOLVED
  • CLOSED
  • TO_REVIEW
  • IN_REVIEW
  • REVIEWED

To get a list of not closed issues you have to use:

statuses=OPEN,CONFIRMED,REOPENED,RESOLVED,TO_REVIEW,IN_REVIEW
agabrys
  • 8,728
  • 3
  • 35
  • 73