Defect #33175

Gantt bar's mark is not displayed if the start date is the first day of the Gantt

Added by Yuichi HARADA 18 days ago. Updated 18 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Gantt
Target version:Candidate for next minor release
Resolution: Affected version:

Description

If the start date is the first day of the Gantt or the due date is the last day of the Gantt, the mark of the Gantt bar is not displayed.

expect actual

expect.png (266 KB) Yuichi HARADA, 2020-03-19 04:09

actual.png (224 KB) Yuichi HARADA, 2020-03-19 04:09

33175.patch Magnifier (2.59 KB) Yuichi HARADA, 2020-03-19 04:16

History

#1 Updated by Yuichi HARADA 18 days ago

Resolve with the following patch.

diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 285eb66a0..ad9bab8ad 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -624,13 +624,13 @@ module Redmine
         zoom ||= @zoom
         coords = {}
         if start_date && end_date && start_date < self.date_to && end_date > self.date_from
-          if start_date > self.date_from
+          if start_date >= self.date_from
             coords[:start] = start_date - self.date_from
             coords[:bar_start] = start_date - self.date_from
           else
             coords[:bar_start] = 0
           end
-          if end_date < self.date_to
+          if end_date <= self.date_to
             coords[:end] = end_date - self.date_from
             coords[:bar_end] = end_date - self.date_from + 1
           else

#2 Updated by Go MAEDA 18 days ago

  • Target version set to Candidate for next minor release

Also available in: Atom PDF