From bf4e13c358926686701450132e7f672587c761fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacobo=20Aragunde=20P=C3=A9rez?= Date: Tue, 3 Jan 2012 14:21:03 +0100 Subject: [PATCH] [Bug #1242] Don't allow progress end dates superior to the corresponding task end date. This situation still happened in tasks with completition near to 100% (for example 99%) and the 'by hours' calculation method. FEA: ItEr75S04BugFixing --- .../java/org/libreplan/web/planner/TaskElementAdapter.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libreplan-webapp/src/main/java/org/libreplan/web/planner/TaskElementAdapter.java b/libreplan-webapp/src/main/java/org/libreplan/web/planner/TaskElementAdapter.java index a8a62c9fc..67a332819 100644 --- a/libreplan-webapp/src/main/java/org/libreplan/web/planner/TaskElementAdapter.java +++ b/libreplan-webapp/src/main/java/org/libreplan/web/planner/TaskElementAdapter.java @@ -660,6 +660,13 @@ public class TaskElementAdapter { GanttDate result = calculateLimitDateByHours(advanceHours); if (result == null) { result = calculateLimitDateByPercentage(advancePercentage); + + } else { + GanttDate endDate = toGantt(taskElement.getIntraDayEndDate()); + if (result.compareTo(endDate) > 0) { + //don't allow progress bars wider than the task itself + result = endDate; + } } return result; }