[Bug #1300] Updated intended resources per day after consolidation is added or removed

FEA: ItEr75S04BugFixing
This commit is contained in:
Manuel Rego Casasnovas 2011-12-16 17:15:48 +01:00
parent 1bfdd4f4aa
commit 85ce192e06
2 changed files with 15 additions and 0 deletions

View file

@ -2198,4 +2198,8 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
return false;
}
public void resetIntendedIntendedResourcesPerDayWithNonConsolidated() {
intendedResourcesPerDay = getNonConsolidatedResourcePerDay();
}
}

View file

@ -221,6 +221,15 @@ public class AdvanceConsolidationModel implements IAdvanceConsolidationModel {
} else {
reassignAll(end, allResourceAllocations);
}
resetIntendedResourcesPerDayWithNonConsolidated(allResourceAllocations);
}
private void resetIntendedResourcesPerDayWithNonConsolidated(
Set<ResourceAllocation<?>> allResourceAllocations) {
for (ResourceAllocation<?> resourceAllocation : allResourceAllocations) {
resourceAllocation.resetIntendedIntendedResourcesPerDayWithNonConsolidated();
}
}
private void withDetachOnDayAssignmentRemoval(
@ -326,6 +335,8 @@ public class AdvanceConsolidationModel implements IAdvanceConsolidationModel {
withDetachOnDayAssignmentRemoval(allResourceAllocations);
reassignAll(task.getIntraDayEndDate(), allResourceAllocations);
resetIntendedResourcesPerDayWithNonConsolidated(allResourceAllocations);
}
private void updateConsolidationInAdvanceIfIsNeeded() {