From 8a91e5a669b8ae85d058d374d94c57bcbb8f107d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93scar=20Gonz=C3=A1lez=20Fern=C3=A1ndez?= Date: Thu, 11 Feb 2010 21:35:16 +0100 Subject: [PATCH] ItEr47S04ValidacionEProbasFuncionaisItEr46S04: [Bug #282] Fixing bug. The problem lies in that the start and end data were retrieved from allocation. Allocation start and end are calculated looking into day assignments. The first day was assigned to zero hours when applying the splines and this caused that the allocation start slipped to the next day. As the first interval end was the task's next day too it provoked the failure. --- .../business/planner/entities/StretchesFunction.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StretchesFunction.java b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StretchesFunction.java index 2996bd187..a80392a7e 100644 --- a/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StretchesFunction.java +++ b/navalplanner-business/src/main/java/org/navalplanner/business/planner/entities/StretchesFunction.java @@ -173,8 +173,9 @@ public class StretchesFunction extends AssignmentFunction { List intervalsDefinedByStreches = stretchesFunction .getIntervalsDefinedByStreches(); int totalHours = resourceAllocation.getAssignedHours(); - LocalDate start = resourceAllocation.getStartDate(); - LocalDate end = resourceAllocation.getEndDate(); + Task task = resourceAllocation.getTask(); + LocalDate start = LocalDate.fromDateFields(task.getStartDate()); + LocalDate end = LocalDate.fromDateFields(task.getEndDate()); apply(resourceAllocation, intervalsDefinedByStreches, start, end, totalHours); }