[Bug #760] Fix bug

In case of not satisfying the allocation the proper date must be
returned.

FEA: ItEr66S04BugFixing
This commit is contained in:
Óscar González Fernández 2010-12-20 17:41:43 +01:00
parent ef092794a0
commit 07a30262bf

View file

@ -353,7 +353,9 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
IntraDayDate result = allocator
.untilAllocating(hours(hoursToAllocate));
if (result == null) {
return task.getIntraDayEndDate();
// allocation could not be done
return direction == Direction.FORWARD ? task
.getIntraDayEndDate() : task.getIntraDayStartDate();
}
return result;
}