Bug #1538: Detect inconsistent states on unsaved scheduling points.
FEA: ItEr77S04BugFixing
This commit is contained in:
parent
35f7fca342
commit
b7d612b655
1 changed files with 9 additions and 1 deletions
|
|
@ -316,7 +316,7 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
} else if (isSuperElementPartialOrCompletelyScheduled()) {
|
||||
removeUnscheduled(result);
|
||||
if (wasASchedulingPoint()) {
|
||||
result.add(taskSourceRemoval());
|
||||
removeTaskSource(result);
|
||||
} else {
|
||||
if (hadATaskSource() && currentTaskSourceIsNotTheSame()) {
|
||||
//all the children of this element were unscheduled and then scheduled again,
|
||||
|
|
@ -350,6 +350,14 @@ public abstract class OrderElement extends IntegrationEntity implements
|
|||
}
|
||||
|
||||
private boolean wasASchedulingPoint() {
|
||||
TaskSource currentTaskSource = getTaskSource();
|
||||
// check if the existing TaskSource is inconsistent with the current
|
||||
// scheduling state
|
||||
if (currentTaskSource != null && currentTaskSource.getTask().isLeaf()
|
||||
&& getSchedulingStateType() != Type.SCHEDULING_POINT) {
|
||||
return true;
|
||||
}
|
||||
// check if the scheduling state has changed WRT the DB
|
||||
SchedulingDataForVersion currentVersionOnDB = getCurrentVersionOnDB();
|
||||
return SchedulingState.Type.SCHEDULING_POINT == currentVersionOnDB
|
||||
.getSchedulingStateType();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue