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

sort order of plugin list is not working by default

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • core
    • None
    • Jenkins 1.501

      In the plugin manager, I have the list of plugins sorted by name by default.

      Nevertheless, everytime I navigate to that page for the first time
      http://jenkins.local/pluginManager/installed
      the plugins are in random order, although the "Name" column header has the little down arrow next to it.

      I have to click on the header once, to make it work, and then it continues to work till I come back the next day or so.

          [JENKINS-17039] sort order of plugin list is not working by default

          Jesse Glick added a comment -

          Would probably suffice for PluginManager.getPlugins() to do something like

          List<PluginWrapper> r = new ArrayList<PluginWrapper>(plugins);
          Collections.sort(r);
          return r;
          

          Try it, test it, and file a pull request!

          Jesse Glick added a comment - Would probably suffice for PluginManager.getPlugins() to do something like List<PluginWrapper> r = new ArrayList<PluginWrapper>(plugins); Collections.sort(r); return r; Try it, test it, and file a pull request!

          Marc Günther added a comment -

          I don't know, this somehow feels wrong. Why would the getter know anything about the sort order of the presentation? Why should it sort by name and in what direction?

          This should be handled by the same class that does the sorting in all other cases. It is already displaying that little arrow to indicate that the list is sorted, it is also that class' responsibility to actually sort the list.

          Marc Günther added a comment - I don't know, this somehow feels wrong. Why would the getter know anything about the sort order of the presentation? Why should it sort by name and in what direction? This should be handled by the same class that does the sorting in all other cases. It is already displaying that little arrow to indicate that the list is sorted, it is also that class' responsibility to actually sort the list.

          Jesse Glick added a comment -

          Probably an issue in JavaScript then; check sortable.js.

          Jesse Glick added a comment - Probably an issue in JavaScript then; check sortable.js .

          Code changed in jenkins
          User: Seiji Sogabe
          Path:
          changelog.html
          war/src/main/webapp/scripts/sortable.js
          http://jenkins-ci.org/commit/jenkins/26b15e139c5042f4ef93658858061c670be22961
          Log:
          [FIXED JENKINS-17039] sort order of plugin list is not working by default

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Seiji Sogabe Path: changelog.html war/src/main/webapp/scripts/sortable.js http://jenkins-ci.org/commit/jenkins/26b15e139c5042f4ef93658858061c670be22961 Log: [FIXED JENKINS-17039] sort order of plugin list is not working by default

          dogfood added a comment -

          Integrated in jenkins_main_trunk #2438
          [FIXED JENKINS-17039] sort order of plugin list is not working by default (Revision 26b15e139c5042f4ef93658858061c670be22961)

          Result = SUCCESS
          Seiji Sogabe : 26b15e139c5042f4ef93658858061c670be22961
          Files :

          • war/src/main/webapp/scripts/sortable.js
          • changelog.html

          dogfood added a comment - Integrated in jenkins_main_trunk #2438 [FIXED JENKINS-17039] sort order of plugin list is not working by default (Revision 26b15e139c5042f4ef93658858061c670be22961) Result = SUCCESS Seiji Sogabe : 26b15e139c5042f4ef93658858061c670be22961 Files : war/src/main/webapp/scripts/sortable.js changelog.html

            sogabe sogabe
            marc_guenther Marc Günther
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: