Bug #1329: Now tasks are not enlarged and nothing breaks just after selecting a stretches function

This fix the issue described in previous commit. However, the bug itself is not
fixed yet and needs more work in the stretches function allocation.

FEA: ItEr76S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2012-01-11 12:24:59 +01:00
parent f5b4d79c97
commit 59f6fb165e
2 changed files with 3 additions and 8 deletions

View file

@ -131,14 +131,8 @@ public class StretchesFunction extends AssignmentFunction {
LocalDate startInclusive, LocalDate taskEnd,
int intervalHours) {
Validate.isTrue(!isConsolidated());
// End has to be exclusive on last Stretch
LocalDate endDate = getEnd();
if (endDate.equals(taskEnd)) {
endDate = endDate.plusDays(1);
}
resourceAllocation.withPreviousAssociatedResources()
.onInterval(getStartFor(startInclusive), endDate)
.onInterval(getStartFor(startInclusive), getEnd())
.allocateHours(intervalHours);
}

View file

@ -216,7 +216,8 @@ public enum StretchesFunctionTypeEnum {
intervals.addAll(stretchesFunction.getIntervalsDefinedByStreches());
LocalDate startInclusive = resourceAllocation.getFirstNonConsolidatedDate();
LocalDate endExclusive = resourceAllocation.getEndDate();
LocalDate endExclusive = resourceAllocation.getIntraDayEndDate()
.asExclusiveEnd();
int totalHours = resourceAllocation.getNonConsolidatedHours();
apply(resourceAllocation, intervals, startInclusive, endExclusive, totalHours);
}