[Bug #749] Fix bug

When the task is limiting but has not been assigned yet, the end date
must be modified when the task is moved.

FEA: ItEr64S03BugFixing
This commit is contained in:
Óscar González Fernández 2010-12-10 17:10:25 +01:00
parent 0e251086c3
commit 0f247ae039

View file

@ -223,6 +223,10 @@ public class Task extends TaskElement implements ITaskLeafConstraint {
&& resourceAllocation.isLimitingAndHasDayAssignments();
}
private boolean isLimitingAndNotAssignedYet() {
return isLimiting() && !isLimitingAndHasDayAssignments();
}
public void addResourceAllocation(ResourceAllocation<?> resourceAllocation) {
addResourceAllocation(resourceAllocation, true);
}
@ -460,7 +464,8 @@ public class Task extends TaskElement implements ITaskLeafConstraint {
return;
}
if (calculatedValue != CalculatedValue.END_DATE
|| getSatisfiedResourceAllocations().isEmpty()) {
|| getSatisfiedResourceAllocations().isEmpty()
|| isLimitingAndNotAssignedYet()) {
setIntraDayEndDate(calculateEndKeepingLength(newStartDate));
}
setIntraDayStartDate(newStartDate);