Actions
Defect #19248
closedEnd markers in gantt PDF are misaligned
Start date:
Due date:
% Done:
0%
Estimated time:
Resolution:
Fixed
Affected version:
Description
the line end's mark appears between the end date -1 and the end day,
it's better to display it between the end day and the end date + 1.
by modify ../redmine/helpers/gantt.rb
def pdf_task
Environment:
Redmine version 3.0.0.stable
Files
Updated by Yuichi HARADA almost 5 years ago
- File expect.png expect.png added
- File actual.png actual.png added
- File 19248.patch 19248.patch added
I confirmed that the display position of the end mark was shifted. In addition, the display position of the end mark of the PNG image was shifted similarly.
expect | actual |
---|---|
Improved with the following patch.
diff --git a/lib/redmine/helpers/gantt.rb b/lib/redmine/helpers/gantt.rb
index 285eb66a0..406a818e1 100644
--- a/lib/redmine/helpers/gantt.rb
+++ b/lib/redmine/helpers/gantt.rb
@@ -631,7 +631,7 @@ module Redmine
coords[:bar_start] = 0
end
if end_date < self.date_to
- coords[:end] = end_date - self.date_from
+ coords[:end] = end_date - self.date_from + 1
coords[:bar_end] = end_date - self.date_from + 1
else
coords[:bar_end] = self.date_to - self.date_from + 1
@@ -897,7 +897,7 @@ module Redmine
if coords[:end]
style = +""
style << "top:#{params[:top]}px;"
- style << "left:#{coords[:end] + params[:zoom]}px;"
+ style << "left:#{coords[:end]}px;"
style << "width:15px;"
output << view.content_tag(:div, ' '.html_safe,
:style => style,
@@ -1031,7 +1031,7 @@ module Redmine
])
end
if coords[:end]
- x = params[:subject_width] + coords[:end] + params[:zoom]
+ x = params[:subject_width] + coords[:end]
y = params[:top] - height / 2
params[:image].fill('blue')
params[:image].draw('polygon %d,%d %d,%d %d,%d %d,%d' % [
Updated by Go MAEDA almost 5 years ago
- Target version set to 4.1.1
Setting the target version to 4.1.1.
Updated by Go MAEDA almost 5 years ago
- Subject changed from gantt's pdf line end mark's position to End markers in gantt PDF are misaligned
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Priority changed from Low to Normal
- Target version changed from 4.1.1 to 4.0.7
- Resolution set to Fixed
Committed the fix. Thank you.
Actions