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

Code has to use AbstractOrganization yet all API uses BlueOrganisation

    • Icon: Task Task
    • Resolution: Unresolved
    • Icon: Minor Minor
    • blueocean-plugin
    • None

      An AbstractOrganization can have an abirtray root - organisations do not have to exist at the root of Jenkins.

      However getGroup() is defined on AbstractOrganization and the API uses BlueOrganization so this leads to messy code with cast and instanceof.

      The structure of the code should be re-evaluated.

      example

          [JENKINS-45604] Code has to use AbstractOrganization yet all API uses BlueOrganisation

          James Nord created issue -
          James Nord made changes -
          Description Original: An {{AbstractOrganization}} can have an abirtray root - organisations do not have to exist at the root of Jenkins.

          However {{getGroup()}} is defined on {{AbstractOrganization}} and the API uses {{BlueOrganization}} so this leads to messy code with cast and {{instanceof}}.

          The structure of the code should be re-evaluated.
          New: An {{AbstractOrganization}} can have an abirtray root - organisations do not have to exist at the root of Jenkins.

          However {{getGroup()}} is defined on {{AbstractOrganization}} and the API uses {{BlueOrganization}} so this leads to messy code with cast and {{instanceof}}.

          The structure of the code should be re-evaluated.

          [example|https://github.com/jenkinsci/blueocean-plugin/blob/a81eaac317749a1e2aca547b99e335e3a37d3d3a/blueocean-pipeline-api-impl/src/main/java/io/jenkins/blueocean/preload/OrganizationStatePreloader.java#L29]
          James Dumay made changes -
          Sprint New: Blue Ocean 1.3 [ 296 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Epic Link New: JENKINS-35759 [ 171771 ]
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.3-beta-2 [ 296 ] New: Blue Ocean 1.4 [ 311 ]
          James Dumay made changes -
          Rank New: Ranked higher
          James Dumay made changes -
          Sprint Original: Blue Ocean 1.5 - candidates [ 311 ]
          James Dumay made changes -
          Rank New: Ranked higher

            Unassigned Unassigned
            teilo James Nord
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: