ItEr59S24AdaptacionsFinaisEscenarios: Remove limiting allocations when copying due to creating a new version
This commit is contained in:
parent
7749830f3f
commit
a53e99acac
2 changed files with 9 additions and 0 deletions
|
|
@ -306,6 +306,7 @@ public abstract class ResourceAllocation<T extends DayAssignment> extends
|
|||
|
||||
private Set<DerivedAllocation> derivedAllocations = new HashSet<DerivedAllocation>();
|
||||
|
||||
@OnCopy(Strategy.SHARE_COLLECTION_ELEMENTS)
|
||||
private Set<LimitingResourceQueueElement> limitingResourceQueueElements = new HashSet<LimitingResourceQueueElement>();
|
||||
|
||||
private int originalTotalAssignment = 0;
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ import org.navalplanner.business.resources.entities.Criterion;
|
|||
import org.navalplanner.business.resources.entities.Resource;
|
||||
import org.navalplanner.business.resources.entities.Worker;
|
||||
import org.navalplanner.business.scenarios.entities.Scenario;
|
||||
import org.navalplanner.business.util.deepcopy.AfterCopy;
|
||||
|
||||
/**
|
||||
* @author Óscar González Fernández <ogonzalez@igalia.com>
|
||||
|
|
@ -87,6 +88,13 @@ public class Task extends TaskElement {
|
|||
@Valid
|
||||
private Set<ResourceAllocation<?>> resourceAllocations = new HashSet<ResourceAllocation<?>>();
|
||||
|
||||
@AfterCopy
|
||||
private void ifLimitingAllocationRemove() {
|
||||
if (isLimiting()) {
|
||||
resourceAllocations.clear();
|
||||
}
|
||||
}
|
||||
|
||||
private TaskStartConstraint startConstraint = new TaskStartConstraint();
|
||||
|
||||
@Valid
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue