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

Item Categories should not be shipped from /categories

      It is the follow-up to our discussion with recena and jglick.

      The current Item categorization uses JENKINS_URL/categories endpoint to provide the list of categories.

      It causes several concerns:

      • Categories apply to items only, but the "/categories" endpoint does not mention it in paths. Once we want to implement slave categories, it may become a problem
      • The endpoint may conflict with existing closed-source plugins. E.g. I had the Categorization plugin at one of my previous companies, which used the similar endpoint. Update to 2.0 will cause regressions in such plugins
      • The implementation is not pluggable. E.g. Views and Items cannot filter the categories somehow

      Proposed solution:

      • Ship categories via VIEW_URL/itemCategories
      • Allow overriding of the method in views. Just for the future pluggability

          [JENKINS-33972] Item Categories should not be shipped from /categories

          Jesse Glick added a comment -

          Yes go ahead and change categories to itemCategories. I was holding off on a cloudbees-folder release until you did so, so that I can make the matching change.

          Jesse Glick added a comment - Yes go ahead and change categories to itemCategories . I was holding off on a cloudbees-folder release until you did so, so that I can make the matching change.

          oleg_nenashev working in progress....

          Manuel Recena Soto added a comment - oleg_nenashev working in progress....

          Oleg Nenashev added a comment -

          recena Thanks a lot!

          Oleg Nenashev added a comment - recena Thanks a lot!

          Manuel Recena Soto added a comment - oleg_nenashev Done.

          Code changed in jenkins
          User: recena
          Path:
          core/src/main/java/hudson/model/View.java
          war/src/main/js/add-item.js
          http://jenkins-ci.org/commit/jenkins/4a5b825b479d56beb0717bfb1cbcb659c51557fb
          Log:
          JENKINS-33972 The REST API URL has been removed to [..]/itemCategories

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: recena Path: core/src/main/java/hudson/model/View.java war/src/main/js/add-item.js http://jenkins-ci.org/commit/jenkins/4a5b825b479d56beb0717bfb1cbcb659c51557fb Log: JENKINS-33972 The REST API URL has been removed to [..] /itemCategories

          Code changed in jenkins
          User: Daniel Beck
          Path:
          core/src/main/java/hudson/model/View.java
          war/src/main/js/add-item.js
          http://jenkins-ci.org/commit/jenkins/4649e04cbe58f5af0e583da04084b2ebc442a320
          Log:
          Merge pull request #2208 from recena/JENKINS-33972

          JENKINS-33972 The REST API URL has been removed to [..]/itemCategories

          Compare: https://github.com/jenkinsci/jenkins/compare/0db4bc2a6327...4649e04cbe58

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Daniel Beck Path: core/src/main/java/hudson/model/View.java war/src/main/js/add-item.js http://jenkins-ci.org/commit/jenkins/4649e04cbe58f5af0e583da04084b2ebc442a320 Log: Merge pull request #2208 from recena/ JENKINS-33972 JENKINS-33972 The REST API URL has been removed to [..] /itemCategories Compare: https://github.com/jenkinsci/jenkins/compare/0db4bc2a6327...4649e04cbe58

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/dab943292bcc6121c62701cb62307edce09c6d31
          Log:
          JENKINS-33972 View.doCategories renamed to doItemCategories.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/dab943292bcc6121c62701cb62307edce09c6d31 Log: JENKINS-33972 View.doCategories renamed to doItemCategories.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/526694d36b9d2e0685ceac9c168204a209969b3d
          Log:
          Merge pull request #54 from jglick/itemCategories-JENKINS-33972

          JENKINS-33972 View.doCategories renamed to doItemCategories

          #55 is identical, just merging the lower-numbered one.

          Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/6f2daf46be91...526694d36b9d

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/526694d36b9d2e0685ceac9c168204a209969b3d Log: Merge pull request #54 from jglick/itemCategories- JENKINS-33972 JENKINS-33972 View.doCategories renamed to doItemCategories #55 is identical, just merging the lower-numbered one. Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/6f2daf46be91...526694d36b9d

          Code changed in jenkins
          User: recena
          Path:
          src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/c3ba1ab0efab2552003752af46d659504b69c3e5
          Log:
          JENKINS-33972 View.doCategories was renamed to View.doItemCategories

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: recena Path: src/main/java/com/cloudbees/hudson/plugins/folder/FolderAddFilter.java http://jenkins-ci.org/commit/cloudbees-folder-plugin/c3ba1ab0efab2552003752af46d659504b69c3e5 Log: JENKINS-33972 View.doCategories was renamed to View.doItemCategories

          Code changed in jenkins
          User: Jesse Glick
          Path:
          http://jenkins-ci.org/commit/cloudbees-folder-plugin/ac521be9372a056a799c354e75f5ce33d516b7ff
          Log:
          Merge pull request #55 from recena/JENKINS-33972

          JENKINS-33972 View.doCategories was renamed to View.doItemCategories

          Heck, merge them both, see if GitHub can handle it!

          Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/526694d36b9d...ac521be9372a

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: http://jenkins-ci.org/commit/cloudbees-folder-plugin/ac521be9372a056a799c354e75f5ce33d516b7ff Log: Merge pull request #55 from recena/ JENKINS-33972 JENKINS-33972 View.doCategories was renamed to View.doItemCategories Heck, merge them both, see if GitHub can handle it! Compare: https://github.com/jenkinsci/cloudbees-folder-plugin/compare/526694d36b9d...ac521be9372a

            recena Manuel Recena Soto
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: