[Bug #855] Fix bug

The last valid resources per day and hours are used; not the
calculated ones. Otherwise when changing the calendar of a resource,
the resources per day are recalculated when reassigning. This caused
the allocation to not change.

FEA: ItEr71S04BugFixing
This commit is contained in:
Óscar González Fernández 2011-02-21 17:05:22 +01:00
parent a196487fd0
commit 02be879a14

View file

@ -1172,10 +1172,7 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
}
protected int getIntendedHours() {
if (isUnsatisfied()) {
return originalTotalAssignment;
}
return getAssignedHours();
return originalTotalAssignment;
}
@OnCopy(Strategy.IGNORE)
@ -1538,15 +1535,10 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
}
/**
* Calculates the intended resources per day for this allocation. If the
* allocation is not satisfied cannot be calculated on the current
* assignment values and must be retrieved from the value in the field.
* Returns the last valid specified resources per day
*/
protected ResourcesPerDay getIntendedResourcesPerDay() {
if (isUnsatisfied()) {
return getResourcesPerDay();
}
return getNonConsolidatedResourcePerDay();
return getResourcesPerDay();
}
public ResourcesPerDay getConsolidatedResourcePerDay() {