From b24ee03837bd4896f89f7ea1aa5912641b308173 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Mon, 16 Jul 2012 12:37:12 +0200 Subject: [PATCH] Small code refactor. With these changes, the code runs exactly the same way. FEA: ItEr76S04BugFixing --- .../libreplan/business/orders/entities/TaskSource.java | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/TaskSource.java b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/TaskSource.java index 99d813ea1..bcea1f7f6 100644 --- a/libreplan-business/src/main/java/org/libreplan/business/orders/entities/TaskSource.java +++ b/libreplan-business/src/main/java/org/libreplan/business/orders/entities/TaskSource.java @@ -203,15 +203,10 @@ public class TaskSource extends BaseEntity { OrderElement orderElement) { task.setName(orderElement.getName()); Date orderInitDate = orderElement.getOrder().getInitDate(); - if (task.getStartDate() == null && orderInitDate != null) { + if (task.getIntraDayStartDate() == null && orderInitDate != null) { task.setStartDate(orderInitDate); } - if (task.getEndDate() == null) { - task.initializeDatesIfNeeded(); - } - if (!hasSomeAllocationDone(task)) { - task.initializeDatesIfNeeded(); - } + task.initializeDatesIfNeeded(); task.updateDeadlineFromOrderElement(); }