[Bug #826] Fix bug Validating Exception on allocating a resource to a limiting task the first time

FEA: ItEr69S04BugFixing
This commit is contained in:
Diego Pino Garcia 2011-01-31 11:48:24 +01:00
parent 71461a5092
commit 1d74dc565a

View file

@ -334,13 +334,14 @@ public class LimitingResourceAllocationModel implements ILimitingResourceAllocat
ResourceAllocation<?> resourceAllocation = getAssociatedResourceAllocation();
if (resourceAllocation != null) {
if (!resourceAllocation.hasAssignments()) {
task.resizeToHours(resourceAllocation
.getIntendedTotalHours());
}
if (resourceAllocation.isNewObject()) {
addAssociatedLimitingResourceQueueElement(task,
resourceAllocation);
} else {
if (!resourceAllocation.hasAssignments()) {
task.resizeToHours(resourceAllocation
.getIntendedTotalHours());
}
}
}
taskDAO.save(task);