[Bug #760] Fix corner case
When the calculated value was end date and the task was moved backwards with a new end date that is before to the old start date and the allocation cannot be satisfied, the start date picked would be posterior to the new end. To avoid this, the dates must always be recalculated taking into account the length. FEA: ItEr66S04BugFixing
This commit is contained in:
parent
edf8bab805
commit
5112be9c6e
1 changed files with 2 additions and 13 deletions
|
|
@ -231,10 +231,6 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
|
|||
&& resourceAllocation.isLimitingAndHasDayAssignments();
|
||||
}
|
||||
|
||||
private boolean isLimitingAndNotAssignedYet() {
|
||||
return isLimiting() && !isLimitingAndHasDayAssignments();
|
||||
}
|
||||
|
||||
public void addResourceAllocation(ResourceAllocation<?> resourceAllocation) {
|
||||
addResourceAllocation(resourceAllocation, true);
|
||||
}
|
||||
|
|
@ -471,11 +467,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
|
|||
if (previousStart.equals(newStartDate)) {
|
||||
return;
|
||||
}
|
||||
if (calculatedValue != CalculatedValue.END_DATE
|
||||
|| getSatisfiedResourceAllocations().isEmpty()
|
||||
|| isLimitingAndNotAssignedYet()) {
|
||||
setIntraDayEndDate(calculateEndKeepingLength(newStartDate));
|
||||
}
|
||||
setIntraDayEndDate(calculateEndKeepingLength(newStartDate));
|
||||
setIntraDayStartDate(newStartDate);
|
||||
doReassignment(Direction.FORWARD);
|
||||
}
|
||||
|
|
@ -490,10 +482,7 @@ public class Task extends TaskElement implements ITaskPositionConstrained {
|
|||
if (getIntraDayEndDate().equals(newEnd)) {
|
||||
return;
|
||||
}
|
||||
if (calculatedValue != CalculatedValue.END_DATE
|
||||
|| getSatisfiedResourceAllocations().isEmpty()) {
|
||||
setIntraDayStartDate(calculateNewStartGivenEnd(newEnd));
|
||||
}
|
||||
setIntraDayStartDate(calculateNewStartGivenEnd(newEnd));
|
||||
setIntraDayEndDate(newEnd);
|
||||
doReassignment(Direction.BACKWARD);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue