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

sort order of plugin list is not working by default

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Trivial
    • Resolution: Fixed
    • Component/s: core
    • Labels:
      None
    • Environment:
      Jenkins 1.501
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          jglick 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!

          Show
          jglick 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!
          Hide
          marc_guenther 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.

          Show
          marc_guenther 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.
          Hide
          jglick Jesse Glick added a comment -

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

          Show
          jglick Jesse Glick added a comment - Probably an issue in JavaScript then; check sortable.js .
          Hide
          scm_issue_link 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

          Show
          scm_issue_link 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
          Hide
          dogfood 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
          Show
          dogfood 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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: