Bug #1387: Code refactor of the previous patches for this bug.

FEA: ItEr76S04BugFixing
This commit is contained in:
Jacobo Aragunde Pérez 2012-03-27 10:45:05 +02:00
parent 21df77d458
commit 749de4e569

View file

@ -290,7 +290,7 @@ public abstract class OrderElement extends IntegrationEntity implements
SchedulingDataForVersion schedulingDataForVersion) {
List<TaskSourceSynchronization> result = new ArrayList<TaskSourceSynchronization>();
if (isSchedulingPoint()) {
if (itWasntSchedulingPoint()) {
if (!wasASchedulingPoint()) {
//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);
@ -329,12 +329,6 @@ public abstract class OrderElement extends IntegrationEntity implements
.getSchedulingStateType();
}
private boolean itWasntSchedulingPoint() {
SchedulingDataForVersion currentVersionOnDB = getCurrentVersionOnDB();
return SchedulingState.Type.SCHEDULING_POINT != currentVersionOnDB
.getSchedulingStateType();
}
private List<TaskSourceSynchronization> childrenSynchronizations() {
List<TaskSourceSynchronization> childrenOfGroup = new ArrayList<TaskSourceSynchronization>();
for (OrderElement orderElement : getSomewhatScheduledOrderElements()) {