From 82cae5cff73e7e3f2527c3ddb91dc989ceb62293 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Gonz=C3=A1lez=20Fern=C3=A1ndez?= Date: Wed, 22 Sep 2010 13:12:19 +0200 Subject: [PATCH] ResourceAllocation#sortByStartDate uses the intraDayStartDate to compare the allocations FEA: ItEr60S19TimeUnitDataType --- .../business/planner/entities/ResourceAllocation.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/ResourceAllocation.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/ResourceAllocation.java index bead7796e..288067522 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/ResourceAllocation.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/ResourceAllocation.java @@ -130,13 +130,14 @@ public abstract class ResourceAllocation extends @Override public int compare(ResourceAllocation o1, ResourceAllocation o2) { - if (o1.getStartDate() == null) { + if (o1.getIntraDayStartDate() == null) { return -1; } - if (o2.getStartDate() == null) { + if (o2.getIntraDayStartDate() == null) { return 1; } - return o1.getStartDate().compareTo(o2.getStartDate()); + return o1.getIntraDayStartDate().compareTo( + o2.getIntraDayStartDate()); } }; }