Defect #33140

Gantt bar is not displayed if the due date is the leftmost date or the start date is the rightmost date

Added by Jaebok Oh 5 months ago. Updated 13 days ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:Go MAEDA% Done:

0%

Category:Gantt
Target version:4.0.8
Resolution:Fixed Affected version:4.0.6

Description

If the start date and due date are 1st of the month, this will not be displayed.

gantchart.png (144 KB) Jaebok Oh, 2020-03-13 03:16

33140.patch Magnifier (2.46 KB) Yuichi HARADA, 2020-03-16 07:07

Associated revisions

Revision 19935
Added by Go MAEDA 13 days ago

Gantt bar is not displayed if the due date is the leftmost date or the start date is the rightmost date (#33140).

Patch by Yuichi HARADA.

Revision 19936
Added by Go MAEDA 13 days ago

Merged r19935 from trunk to 4.1-stable (#33140).

Revision 19937
Added by Go MAEDA 13 days ago

Merged r19935 from trunk to 4.0-stable (#33140).

History

#1 Updated by Go MAEDA 5 months ago

  • Status changed from New to Confirmed
  • Affected version changed from 4.1.0 to 4.0.6

#2 Updated by Go MAEDA 5 months ago

  • Subject changed from If the start date and due date are 1st of the month, this will not be displayed. to Gantt bar is not displayed if the start date and the due date are the first day of the month

#3 Updated by Go MAEDA 5 months ago

  • Subject changed from Gantt bar is not displayed if the start date and the due date are the first day of the month to Gantt bar is not displayed if the due date is the first day of the month

#4 Updated by Yuichi HARADA 5 months ago

With the following patch, the Gantt bar is displayed if the due date is the first day of the Gantt or the start date is the last day of the Gantt.

diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 285eb66a0..e4663e08e 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -623,7 +623,7 @@ module Redmine
       def coordinates(start_date, end_date, progress, zoom=nil)
         zoom ||= @zoom
         coords = {}
-        if start_date && end_date && start_date < self.date_to && end_date > self.date_from
+        if start_date && end_date && start_date <= self.date_to && end_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

#5 Updated by Go MAEDA 4 months ago

  • Target version set to Candidate for next minor release

#6 Updated by Go MAEDA 24 days ago

  • Target version changed from Candidate for next minor release to 4.0.8

Setting the target version to 4.0.8.

#7 Updated by Go MAEDA 13 days ago

  • Subject changed from Gantt bar is not displayed if the due date is the first day of the month to Gantt bar is not displayed if the due date is the leftmost date or the start date is the rightmost date
  • Status changed from Confirmed to Resolved
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch.

#8 Updated by Go MAEDA 13 days ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF