diff --git lib/redmine/helpers/gantt.rb lib/redmine/helpers/gantt.rb index cec3237..1e22c1d 100644 --- lib/redmine/helpers/gantt.rb +++ lib/redmine/helpers/gantt.rb @@ -298,8 +298,11 @@ module Redmine start_date ||= self.date_from start_left = ((start_date - self.date_from)*options[:zoom]).floor - i_end_date = ((project.due_date <= self.date_to) ? project.due_date : self.date_to ) - i_done_date = start_date + ((project.due_date - start_date+1)* project.completed_percent(:include_subprojects => true)/100).floor + i_end_date = project.due_date + i_end_date ||= self.date_to + i_end_date = (i_end_date <= self.date_to ? i_end_date : self.date_to ) + + i_done_date = start_date + ((i_end_date - start_date+1)* project.completed_percent(:include_subprojects => true)/100).floor i_done_date = (i_done_date <= self.date_from ? self.date_from : i_done_date ) i_done_date = (i_done_date >= self.date_to ? self.date_to : i_done_date )