Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-36967

self.href for a favorited item is incorrect

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • blueocean-plugin
    • None
    • 1.0-m12

      When creating a new favorites or fetching the user's list of favorites, the self.url for the favorite itself (not the "item" that was favorited) is incorrect:

      {
          "_class": "io.jenkins.blueocean.service.embedded.rest.FavoriteImpl",
          "_links": {
              "self": {
                  "_class": "io.jenkins.blueocean.rest.hal.Link",
                  "href": "/blue/rest/users/cmeyers/favorites/blueocean-pr-testing/"
              }
          },
          "item": {
              ...
          }
      

      the href should instead be:
      /blue/rest/organizations/jenkins/pipelines/blueocean-pr-testing/favorite/

      This will allow the UI to use the URL above when we want to remove a favorite by making a PUT request to that URL with this payload:

      {"favorite": false}
      

            vivek Vivek Pandey
            cliffmeyers Cliff Meyers
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: