Multi-branch pipeline favorited via classic UI has "item" returned as MultiBranchPipelineImpl rather than BranchImpl

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      If a user favorites a multi-branch pipeline via the classic UI, the blue ocean REST API returns the favorited item as an instance of MultibranchPipelineImpl rather than BranchImpl (see JSON below). Ideally the favorites API would be consistent by ensuring the default branch is returning regardless of how the user favorited it.

      vivek Let me know if you want to discuss a different workaround. michaelneale seemed to think this was the right way to approach it but curious what you think.

      {
          "_class": "io.jenkins.blueocean.service.embedded.rest.FavoriteImpl",
          "_links": {
              "self": {
                  "_class": "io.jenkins.blueocean.rest.hal.Link",
                  "href": "/blue/rest/users/cmeyers/favorites/blueocean/"
              }
          },
          "item": {
              "_class": "io.jenkins.blueocean.service.embedded.rest.MultiBranchPipelineImpl",
              "_links": {
                  "self": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/"
                  },
                  "branches": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/branches/"
                  },
                  "actions": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/actions/"
                  },
                  "runs": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/runs/"
                  },
                  "queue": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/queue/"
                  }
              },
              "actions": [{
                  "_class": "com.cloudbees.hudson.plugins.folder.relocate.RelocationAction",
                  "_links": {
                      "self": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/move/"
                      }
                  },
                  "urlName": "move"
              }, {
                  "_class": "org.jenkinsci.plugins.workflow.cps.Snippetizer$LocalAction",
                  "_links": {
                      "self": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/pipeline-syntax/"
                      }
                  },
                  "urlName": "pipeline-syntax"
              }, {
                  "_class": "com.cloudbees.plugins.credentials.ViewCredentialsAction",
                  "_links": {
                      "self": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/pipelines/blueocean/credentials/"
                      }
                  },
                  "stores": {
                      "folder": {
                          "_class": "com.cloudbees.hudson.plugins.folder.properties.FolderCredentialsProvider$FolderCredentialsProperty$CredentialsStoreActionImpl"
                      }
                  },
                  "urlName": "credentials"
              }],
              "displayName": "blueocean",
              "fullName": "blueocean",
              "name": "blueocean",
              "organization": "jenkins",
              "estimatedDurationInMillis": 9437,
              "numberOfFolders": 0,
              "numberOfPipelines": 17,
              "weatherScore": 0,
              "branchNames": [
                  "feature%2FUX-311",
                  "feature%2FUX-68",
                  "UX-498",
                  "hotfix%2FUX-307",
                  "ux-412",
                  "UX-454",
                  "master",
                  "bug%2FUX-202",
                  "experiment%2Ferrors-interstitials",
                  "feature%2FUX-262-bug-prs",
                  "bug%2FUX-334",
                  "feature%2FUX-495",
                  "UX-257",
                  "UX-301",
                  "bug%2Fgithub-load",
                  "feature%2FUX-181",
                  "UX-439"
              ],
              "numberOfFailingBranches": 17,
              "numberOfFailingPullRequests": 0,
              "numberOfSuccessfulBranches": 0,
              "numberOfSuccessfulPullRequests": 0,
              "totalNumberOfBranches": 17,
              "totalNumberOfPullRequests": 0
          }
      }
      

            Assignee:
            Vivek Pandey
            Reporter:
            Cliff Meyers
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: