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

Fix comparison of ItemInfo objects

    Details

    • Similar Issues:

      Description

      If an ItemInfo object has the sortAsInQueueSince attribute set, the compareTo() method is not working correctly anymore.

      The check if we can sort by the InQueueSince time, is correctly using the getSortableInQueueSince() method, which includes the sortAsInQueueSince attribute and the inQueueSince attribute.

      However, the actually comparison does not use this function and uses getInQueueSince() instead. Because of that the sortAsInQueueSince attribute is ignored and the objects are compared wrongly, leading to a wrongly sorted build queue.

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Patrick Firnkes
            Path:
            src/main/java/jenkins/advancedqueue/sorter/ItemInfo.java
            http://jenkins-ci.org/commit/priority-sorter-plugin/2876ebf26a3e47a0159cdaf5169fb390981be340
            Log:
            JENKINS-41419 Fix comparison of ItemInfo objects

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Patrick Firnkes Path: src/main/java/jenkins/advancedqueue/sorter/ItemInfo.java http://jenkins-ci.org/commit/priority-sorter-plugin/2876ebf26a3e47a0159cdaf5169fb390981be340 Log: JENKINS-41419 Fix comparison of ItemInfo objects
            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Oleg Nenashev
            Path:
            src/main/java/jenkins/advancedqueue/sorter/ItemInfo.java
            http://jenkins-ci.org/commit/priority-sorter-plugin/20af6e44ef0abe5042c7fc9db1f05955cc13879e
            Log:
            Merge pull request #37 from patani1/jenkins_41419

            JENKINS-41419 Fix comparison of ItemInfo objects

            Compare: https://github.com/jenkinsci/priority-sorter-plugin/compare/ecbaf9f4467a...20af6e44ef0a

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oleg Nenashev Path: src/main/java/jenkins/advancedqueue/sorter/ItemInfo.java http://jenkins-ci.org/commit/priority-sorter-plugin/20af6e44ef0abe5042c7fc9db1f05955cc13879e Log: Merge pull request #37 from patani1/jenkins_41419 JENKINS-41419 Fix comparison of ItemInfo objects Compare: https://github.com/jenkinsci/priority-sorter-plugin/compare/ecbaf9f4467a...20af6e44ef0a
            Hide
            oleg_nenashev Oleg Nenashev added a comment -

            The fix has been released in 3.5.1

            Show
            oleg_nenashev Oleg Nenashev added a comment - The fix has been released in 3.5.1

              People

              • Assignee:
                emsa23 Magnus Sandberg
                Reporter:
                patfirn Patrick Firnkes
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: