From 5d8860474b9e10a4da48b9c8c82a05123a5ad7a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Tue, 27 Mar 2012 10:38:53 +0200 Subject: [PATCH] Bug #1387: Fix bug when it happens in the opposite way. This fixes when you have a container task which is a scheduling point, and you unschedule it to schedule its children. This is the opposite to the original description of the bug, but the cause is the same. FEA: ItEr76S04BugFixing --- .../org/libreplan/business/orders/entities/OrderElement.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java index e717bed77..334141293 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/OrderElement.java @@ -324,8 +324,9 @@ public abstract class OrderElement extends IntegrationEntity implements } private boolean wasASchedulingPoint() { - return getTaskSource() != null - && getTaskSource().getTask() instanceof Task; + SchedulingDataForVersion currentVersionOnDB = getCurrentVersionOnDB(); + return SchedulingState.Type.SCHEDULING_POINT == currentVersionOnDB + .getSchedulingStateType(); } private boolean itWasntSchedulingPoint() {