From 48b47835241a77ee27ac47968db4ef8ba064dd10 Mon Sep 17 00:00:00 2001 From: Manuel Rego Casasnovas Date: Tue, 13 Nov 2012 10:53:00 +0100 Subject: [PATCH] Update tasks in Gantt after adapting start and end date of all tasks First all tasks are proccesed and the start and end date adapted accordingly. Then all the tasks updated from timesheets are updated in the Gantt view. FEA: ItEr77S12AdaptPlanningAccordingTimesheets --- .../web/planner/adaptplanning/AdaptPlanningCommand.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/planner/adaptplanning/AdaptPlanningCommand.java b/libreplan-webapp/src/main/java/org/libreplan/web/planner/adaptplanning/AdaptPlanningCommand.java index 6276681ee..419023dae 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/planner/adaptplanning/AdaptPlanningCommand.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/planner/adaptplanning/AdaptPlanningCommand.java @@ -22,7 +22,6 @@ import static org.libreplan.web.I18nHelper._; import java.util.Date; import java.util.List; -import java.util.Set; import org.joda.time.LocalDate; import org.libreplan.business.advance.bootstrap.PredefinedAdvancedTypes; @@ -85,9 +84,14 @@ public class AdaptPlanningCommand implements IAdaptPlanningCommand { } taskElement.setUpdatedFromTimesheets(true); + } + } + for (TaskElement taskElement : taskElements) { + if (taskElement.isUpdatedFromTimesheets()) { updateTask(context, taskElement); } } + context.reloadCharts(); }