Fixes progress calculation on gantt (#7838).

Contributed by Etienne Massip.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@5236 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2011-03-28 17:35:20 +00:00
parent 927a6b045e
commit 86eed08fbf
2 changed files with 25 additions and 7 deletions
+2 -2
View File
@@ -639,10 +639,10 @@ module Redmine
end
if progress
progress_date = start_date + (end_date - start_date) * (progress / 100.0)
progress_date = start_date + (end_date - start_date + 1) * (progress / 100.0)
if progress_date > self.date_from && progress_date > start_date
if progress_date < self.date_to
coords[:bar_progress_end] = progress_date - self.date_from + 1
coords[:bar_progress_end] = progress_date - self.date_from
else
coords[:bar_progress_end] = self.date_to - self.date_from + 1
end