renames sort criteria PHASE to DONE, because phase 0 and 1 are combined

Fri, 23 Oct 2020 11:14:37 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 23 Oct 2020 11:14:37 +0200
changeset 141
8160dfc4dbc3
parent 140
ac35e58efa44
child 142
c0549bcdf2ab

renames sort criteria PHASE to DONE, because phase 0 and 1 are combined

src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java file | annotate | diff | comparison | revisions
src/main/java/de/uapcore/lightpit/viewmodel/util/IssueSorter.java file | annotate | diff | comparison | revisions
--- a/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java	Fri Oct 23 10:19:46 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/modules/ProjectsModule.java	Fri Oct 23 11:14:37 2020 +0200
@@ -241,7 +241,7 @@
 
         for (var issue : issues) issueDao.joinVersionInformation(issue);
         issues.sort(new IssueSorter(
-                new IssueSorter.Criteria(IssueSorter.Field.PHASE, true),
+                new IssueSorter.Criteria(IssueSorter.Field.DONE, true),
                 new IssueSorter.Criteria(IssueSorter.Field.ETA, true),
                 new IssueSorter.Criteria(IssueSorter.Field.UPDATED, false)
         ));
--- a/src/main/java/de/uapcore/lightpit/viewmodel/util/IssueSorter.java	Fri Oct 23 10:19:46 2020 +0200
+++ b/src/main/java/de/uapcore/lightpit/viewmodel/util/IssueSorter.java	Fri Oct 23 11:14:37 2020 +0200
@@ -9,7 +9,7 @@
 public class IssueSorter implements Comparator<Issue> {
 
     public enum Field {
-        PHASE, ETA, UPDATED
+        DONE, ETA, UPDATED
     }
 
     public static class Criteria {
@@ -39,7 +39,7 @@
     private int compare(Issue left, Issue right, Criteria criteria) {
         int result;
         switch (criteria.field) {
-            case PHASE:
+            case DONE:
                 result = Boolean.compare(
                         left.getPhase() == IssueStatus.PHASE_DONE,
                         right.getPhase() == IssueStatus.PHASE_DONE);

mercurial