Project

General

Profile

Feature #6276 » gantt.rb-1day-coloring.patch

fixes coloring of the issues with the same start and end date (1-day tasks) - Pavel Shalagin, 2011-02-25 10:11

View differences:

lib/redmine/helpers/gantt.rb (working copy)
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
end
if progress_date < Date.today
late_date = [Date.today, end_date].min
late_date = [Date.today, (end_date + 1)].min
if late_date > self.date_from && late_date > start_date
if late_date < self.date_to
coords[:bar_late_end] = late_date - self.date_from + 1
coords[:bar_late_end] = late_date - self.date_from
else
coords[:bar_late_end] = self.date_to - self.date_from + 1
end
(2-2/2)