Bug #1387: Reset the TaskSource when an OrderGroup changes to scheduling point.
FEA: ItEr76S04BugFixing
This commit is contained in:
parent
e5ea9caa7f
commit
6af82b4c54
1 changed files with 11 additions and 0 deletions
|
|
@ -57,6 +57,7 @@ import org.libreplan.business.orders.entities.SchedulingState.Type;
|
|||
import org.libreplan.business.orders.entities.TaskSource.TaskSourceSynchronization;
|
||||
import org.libreplan.business.planner.entities.Task;
|
||||
import org.libreplan.business.planner.entities.TaskElement;
|
||||
import org.libreplan.business.planner.entities.TaskGroup;
|
||||
import org.libreplan.business.planner.entities.TaskPositionConstraint;
|
||||
import org.libreplan.business.qualityforms.entities.QualityForm;
|
||||
import org.libreplan.business.qualityforms.entities.TaskQualityForm;
|
||||
|
|
@ -290,6 +291,11 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
SchedulingDataForVersion schedulingDataForVersion) {
|
||||
List<TaskSourceSynchronization> result = new ArrayList<TaskSourceSynchronization>();
|
||||
if (isSchedulingPoint()) {
|
||||
if(isSchedulingPointButItWasNot()) {
|
||||
//this element was a container but now it's a scheduling point
|
||||
//we have to remove the TaskSource which contains a TaskGroup instead of TaskElement
|
||||
removeTaskSource(result);
|
||||
}
|
||||
result
|
||||
.addAll(synchronizationForSchedulingPoint(schedulingDataForVersion));
|
||||
} else if (isSuperElementPartialOrCompletelyScheduled()) {
|
||||
|
|
@ -323,6 +329,11 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
&& getTaskSource().getTask() instanceof Task;
|
||||
}
|
||||
|
||||
private boolean isSchedulingPointButItWasNot() {
|
||||
return getTaskSource() != null
|
||||
&& getTaskSource().getTask() instanceof TaskGroup;
|
||||
}
|
||||
|
||||
private List<TaskSourceSynchronization> childrenSynchronizations() {
|
||||
List<TaskSourceSynchronization> childrenOfGroup = new ArrayList<TaskSourceSynchronization>();
|
||||
for (OrderElement orderElement : getSomewhatScheduledOrderElements()) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue