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

Blue Ocean organization displayName not being exposed or used

    Details

    • Similar Issues:
    • Epic Link:
    • Sprint:
      Blue Ocean 1.1

      Description

      Blue Ocean organizations have a name and display name. But only name seems to be exposed and used for the front-end.

      This is the result of https://ci.blueocean.io/blue/rest/organizations/ where organization name and display name are both exposed as name.

      [
          {
              "_class": "io.jenkins.blueocean.service.embedded.rest.OrganizationImpl",
              "_links": {
                  "pipelines": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/pipelines/"
                  },
                  "self": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/"
                  },
                  "user": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/user/"
                  },
                  "users": {
                      "_class": "io.jenkins.blueocean.rest.hal.Link",
                      "href": "/blue/rest/organizations/jenkins/users/"
                  }
              },
              "name":"jenkins",
              "name":"Jenkins"
          }
      ]
      

      Caused by this line:
      https://github.com/jenkinsci/blueocean-plugin/blob/80627f6dcbcec4c8535cc15c3bfbc6597fdb1ced/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueOrganization.java#L18

      Also the frontend seems to be using the name for everything:
      https://github.com/jenkinsci/blueocean-plugin/blob/fb065140166674ee4720e5b81b85923f95257e55/blueocean-dashboard/src/main/js/components/PipelineRowItem.jsx#L73

      The main page displays "jenkins" instead of "Jenkins"

        Attachments

          Activity

          alobato Alvaro Lobato created issue -
          Hide
          jamesdumay James Dumay added a comment -

          Alvaro Lobato what is the improvement you are describing here? This ticket doesn't have any actionable information.

          Show
          jamesdumay James Dumay added a comment - Alvaro Lobato what is the improvement you are describing here? This ticket doesn't have any actionable information.
          jamesdumay James Dumay made changes -
          Field Original Value New Value
          Epic Link JENKINS-35759 [ 171771 ]
          Hide
          alobato Alvaro Lobato added a comment - - edited

          James Dumay after looking more deeply into this, the problem is that the displayName is not being used. It exists as an attribute to the organization, defaulting to "Jenkins" and name "jenkins", but it isn't used and also it is wrongly exposed through the API as name:

          This is the result of: https://ci.blueocean.io/blue/rest/organizations/

          [
              {
                  "_class": "io.jenkins.blueocean.service.embedded.rest.OrganizationImpl",
                  "_links": {
                      "pipelines": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/pipelines/"
                      },
                      "self": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/"
                      },
                      "user": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/user/"
                      },
                      "users": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/users/"
                      }
                  },
                  "name":"jenkins",
                  "name":"Jenkins"
              }
          ]
          

          Caused by this line:
          https://github.com/jenkinsci/blueocean-plugin/blob/80627f6dcbcec4c8535cc15c3bfbc6597fdb1ced/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueOrganization.java#L18

          Also the frontend seems to be using the name for everything:
          https://github.com/jenkinsci/blueocean-plugin/blob/fb065140166674ee4720e5b81b85923f95257e55/blueocean-dashboard/src/main/js/components/PipelineRowItem.jsx#L73

          I'll re-frase the description.

          Show
          alobato Alvaro Lobato added a comment - - edited James Dumay after looking more deeply into this, the problem is that the displayName is not being used. It exists as an attribute to the organization, defaulting to "Jenkins" and name "jenkins", but it isn't used and also it is wrongly exposed through the API as name: This is the result of: https://ci.blueocean.io/blue/rest/organizations/ [ { "_class" : "io.jenkins.blueocean.service.embedded. rest .OrganizationImpl" , "_links" : { "pipelines" : { "_class" : "io.jenkins.blueocean. rest .hal.Link" , "href" : "/blue/ rest /organizations/jenkins/pipelines/" }, "self" : { "_class" : "io.jenkins.blueocean. rest .hal.Link" , "href" : "/blue/ rest /organizations/jenkins/" }, "user" : { "_class" : "io.jenkins.blueocean. rest .hal.Link" , "href" : "/blue/ rest /organizations/jenkins/user/" }, "users" : { "_class" : "io.jenkins.blueocean. rest .hal.Link" , "href" : "/blue/ rest /organizations/jenkins/users/" } }, "name" : "jenkins" , "name" : "Jenkins" } ] Caused by this line: https://github.com/jenkinsci/blueocean-plugin/blob/80627f6dcbcec4c8535cc15c3bfbc6597fdb1ced/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueOrganization.java#L18 Also the frontend seems to be using the name for everything: https://github.com/jenkinsci/blueocean-plugin/blob/fb065140166674ee4720e5b81b85923f95257e55/blueocean-dashboard/src/main/js/components/PipelineRowItem.jsx#L73 I'll re-frase the description.
          alobato Alvaro Lobato made changes -
          Summary Blue Ocean organization displayName Blue Ocean organization displayName not being exposed or used
          alobato Alvaro Lobato made changes -
          Issue Type Improvement [ 4 ] Bug [ 1 ]
          alobato Alvaro Lobato made changes -
          Description Blue Ocean organizations only have a name and not a display name.

          A display name for the UI should be available which would allow changing the name displayed on the UI for an organization while maintaining the urls and the unique id for that organization (name)
          Blue Ocean organizations have a name and display name. But only name seems to be exposed and used for the front-end.

          alobato Alvaro Lobato made changes -
          alobato Alvaro Lobato made changes -
          Description Blue Ocean organizations have a name and display name. But only name seems to be exposed and used for the front-end.

          Blue Ocean organizations have a name and display name. But only name seems to be exposed and used for the front-end.

          This is the result of {{https://ci.blueocean.io/blue/rest/organizations/}} where organization name and display name are both exposed as name.
          {code}
          [
              {
                  "_class": "io.jenkins.blueocean.service.embedded.rest.OrganizationImpl",
                  "_links": {
                      "pipelines": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/pipelines/"
                      },
                      "self": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/"
                      },
                      "user": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/user/"
                      },
                      "users": {
                          "_class": "io.jenkins.blueocean.rest.hal.Link",
                          "href": "/blue/rest/organizations/jenkins/users/"
                      }
                  },
                  "name":"jenkins",
                  "name":"Jenkins"
              }
          ]
          {code}

          Caused by this line:
          https://github.com/jenkinsci/blueocean-plugin/blob/80627f6dcbcec4c8535cc15c3bfbc6597fdb1ced/blueocean-rest/src/main/java/io/jenkins/blueocean/rest/model/BlueOrganization.java#L18

          Also the frontend seems to be using the name for everything:
          https://github.com/jenkinsci/blueocean-plugin/blob/fb065140166674ee4720e5b81b85923f95257e55/blueocean-dashboard/src/main/js/components/PipelineRowItem.jsx#L73

          The main page displays "jenkins" instead of "Jenkins"

           !Screen Shot 2017-06-01 at 02.21.37.png|thumbnail!
          michaelneale Michael Neale made changes -
          Assignee Vivek Pandey [ vivek ]
          Hide
          michaelneale Michael Neale added a comment -

          ah Vivek Pandey  - if that json above is legit, that is a duplicate name being returned (presumably the second one is meant to be displayName... ??

          Show
          michaelneale Michael Neale added a comment - ah Vivek Pandey  - if that json above is legit, that is a duplicate name being returned (presumably the second one is meant to be displayName... ??
          michaelneale Michael Neale made changes -
          Sprint Blue Ocean 1.1 [ 321 ]
          jamesdumay James Dumay made changes -
          Status Open [ 1 ] In Progress [ 3 ]
          jamesdumay James Dumay made changes -
          Status In Progress [ 3 ] In Review [ 10005 ]
          Hide
          jamesdumay James Dumay added a comment -

          Alvaro Lobato I've split the frontend work out into JENKINS-44595.

          Show
          jamesdumay James Dumay added a comment - Alvaro Lobato I've split the frontend work out into JENKINS-44595 .
          jamesdumay James Dumay made changes -
          Status In Review [ 10005 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          jbriden Jenn Briden made changes -
          Status Resolved [ 5 ] Closed [ 6 ]

            People

            • Assignee:
              vivek Vivek Pandey
              Reporter:
              alobato Alvaro Lobato
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: