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.
This commit is contained in:
Óscar González Fernández 2010-02-11 21:35:16 +01:00
parent 433e004ede
commit 8a91e5a669

View file

@ -173,8 +173,9 @@ public class StretchesFunction extends AssignmentFunction {
List<Interval> 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);
}