ItEr59S08CUAsignacionRecursosLimitantesItEr58S10: [Bug #503] (Scenarios) It is impossible to add generic limiting resource allocation
This commit is contained in:
parent
401ac50fd9
commit
aa9f6ca8ce
4 changed files with 7 additions and 7 deletions
|
|
@ -128,10 +128,11 @@ public class GenericResourceAllocation extends
|
|||
task));
|
||||
}
|
||||
|
||||
public static GenericResourceAllocation create(Task task,
|
||||
public static GenericResourceAllocation createForLimiting(Task task,
|
||||
Collection<? extends Criterion> criterions) {
|
||||
GenericResourceAllocation result = new GenericResourceAllocation(task);
|
||||
result.criterions = new HashSet<Criterion>(criterions);
|
||||
result.setResourcesPerDay(ResourcesPerDay.amount(1));
|
||||
return create(result);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public class SpecificResourceAllocation extends
|
|||
* @param task
|
||||
* @return
|
||||
*/
|
||||
public static SpecificResourceAllocation create(Resource resource,
|
||||
public static SpecificResourceAllocation createForLimiting(Resource resource,
|
||||
Task task) {
|
||||
assert resource.isLimitingResource();
|
||||
SpecificResourceAllocation result = create(new SpecificResourceAllocation(
|
||||
|
|
|
|||
|
|
@ -112,8 +112,7 @@ public class GenericAllocationRow extends AllocationRow {
|
|||
}
|
||||
|
||||
private GenericResourceAllocation createGenericAllocation(Task task) {
|
||||
GenericResourceAllocation result = GenericResourceAllocation.create(
|
||||
task, criterions);
|
||||
GenericResourceAllocation result = GenericResourceAllocation.createForLimiting(task, criterions);
|
||||
GenericResourceAllocation origin = (GenericResourceAllocation) getOrigin();
|
||||
if (origin != null) {
|
||||
result.overrideAssignedHoursForResource(origin);
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ public class LimitingAllocationRow {
|
|||
}
|
||||
|
||||
public static LimitingAllocationRow create(Resource resource, Task task) {
|
||||
return new LimitingAllocationRow(SpecificResourceAllocation.create(resource, task), task);
|
||||
return new LimitingAllocationRow(SpecificResourceAllocation.createForLimiting(resource, task), task);
|
||||
}
|
||||
|
||||
private LimitingAllocationRow(ResourceAllocation<?> resourceAllocation,
|
||||
|
|
@ -103,7 +103,7 @@ public class LimitingAllocationRow {
|
|||
public static LimitingAllocationRow create(Set<Criterion> criteria,
|
||||
Collection<? extends Resource> resources, Task task, int priority) {
|
||||
LimitingAllocationRow result = new LimitingAllocationRow(
|
||||
GenericResourceAllocation.create(task, criteria), task,
|
||||
GenericResourceAllocation.createForLimiting(task, criteria), task,
|
||||
priority);
|
||||
result.setResources(resources);
|
||||
return result;
|
||||
|
|
@ -115,7 +115,7 @@ public class LimitingAllocationRow {
|
|||
|
||||
public static LimitingAllocationRow create(Resource resource, Task task,
|
||||
int priority) {
|
||||
return new LimitingAllocationRow(SpecificResourceAllocation.create(
|
||||
return new LimitingAllocationRow(SpecificResourceAllocation.createForLimiting(
|
||||
resource, task), task, priority);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue