Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-13592

File facets on issues page are broken if using the facet search

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 8.5
    • Component/s: Issues, Web, Web API
    • Labels:
      None
    • Edition:
      Community
    • Production Notes:
      None

      Description

      The File facet on the issues page still uses the fileUuids parameter to /api/issues/search to filter issues by a specific file.

      This works fine for the initial facets that are loaded. It also works fine when using the facet search if the result happened to be in the initial list. However, it does not work when using the facet search and the result was not part of the initial list:

      Problem

      The problem comes from the value passed to the fileUuids filter. This is indeed a UUID for the initial rendering, and will still be a UUID if the search result was displayed in the initial payload. However, it turns to a component key when rendering any search result as a facet.

      This is caused by the fact that the initial list is provided by api/issues/search while the file search results are provided by api/components/tree which do not provide the file uuid.

      Solution

      The ideal solution would be to update api/issues/search to support an new internal parameter that could receive a list of file's key. The UI will then be able to properly filter on files. Ideally we should also drop the internal parameter fileUuids. Also, facets props in api/issues/search should now return the key, rather than uuids.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                mathieu.suen Mathieu Suen
                Reporter:
                wouter.admiraal Wouter Admiraal
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: