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

Sub-portfolios aren't properly displayed as favorite

    XMLWordPrintable

    Details

    • Edition:
      Enterprise
    • Production Notes:
      None

      Description

      When a sub-portfolio is favorited, it isn't shown as favorite after reloading the page.

      Clicking the favorite icon fails (we try to favorite it while it already is).

      Problem:

      /api/navigation/component returns a isFavorite property, which the frontend uses to toggle the star button in the UI. However, for sub-portfolios, this always takes the value of its parent. It seems the problem lies in org.sonar.server.ui.ws.ComponentAction#handle, which loads the rootProject based on the component UUID. This loads the parent portfolio instead, and uses its favorite value.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jacek.poreda Jacek Poreda
              Reporter:
              jeremy.davis Jeremy Davis
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: