From 36b03ea1e73bbda0a7981fa67f000c5e56eed11a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 7 May 2012 16:38:21 +0200 Subject: [PATCH] Bug #1433: Fix the problem when there are multiple levels of tasks involved. FEA: ItEr76S04BugFixing --- .../libreplan/business/orders/entities/OrderElement.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 a8e3cb3d2..09ec25cba 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 @@ -317,7 +317,11 @@ public abstract class OrderElement extends IntegrationEntity implements if(currentTaskSourceIsNotTheSame()) { //all the children of this element were unscheduled and then scheduled again, //its TaskSource has been recreated but we have to remove the old one. - result.add(taskSourceRemoval()); + if(getParent() == null || !getParent().currentTaskSourceIsNotTheSame()) { + //if it's a container node inside another container we could have the + //same problem than in the case of leaf tasks. + result.add(taskSourceRemoval()); + } } result .add(synchronizationForSuperelement(schedulingDataForVersion));