Vote #66954
未完了Gantt to PDF not working with subtasking
70%
説明
When export a gantt chart to PDF, there's no black bar for the parent-issue, and subtasks are not idented.
Since the limitation of characters for the issue title in PDF is shorter than in HTML, maybe instead of identing you could use symbols for sub-levels.
# Parente Task + 1st level subtask - 2nd level subtask . 3rd level subtask
journals
Confirmed with 1.0-RC1
I would stick to the spaces as it is just easier to visualize. Maybe just two spaces per indentation?
--------------------------------------------------------------------------------
Simple quick and dirty fix.
in lib/redmine/export/pdf.rb, find the # Tasks comment then change the following (about 6 lines down)
<pre>
if i.is_a? Issue
text = "#{i.tracker} #{i.id}: #{i.subject}"
else
</pre>
to
<pre>
if i.is_a? Issue
text << (" " * i.level)
text << "#{i.tracker} #{i.id}: #{i.subject}"
else
</pre>
that will give you one space of indentation per level.
--------------------------------------------------------------------------------
To change the colour of parent tasks change the following (Near the bottom of the file).
<pre>
l_width = ((i_late_date - i_start_date+1)*zoom) if i_late_date
l_width ||= 0
pdf.SetX(subject_width + i_left)
pdf.SetFillColor(100,100,100) # CHANGE HERE
pdf.Cell(i_width, 2, "", 0, 0, "", 1)
</pre>
<pre>
l_width = ((i_late_date - i_start_date+1)*zoom) if i_late_date
l_width ||= 0
pdf.SetX(subject_width + i_left)
if i.leaf?
pdf.SetFillColor(200,200,200) # Normal colour
else
pdf.SetFillColor(100,100,100) # Parent colour, change to fit your preferences
end
pdf.Cell(i_width, 2, "", 0, 0, "", 1)
</pre>
Note that this doesn't put the downward pointy bits (That is a technical term) on the parent bars, just changes the colour which is good enough for me at the moment.
--------------------------------------------------------------------------------
I suppose those two fixes up solves most of the problem.
Just tests and the downward pointy bits left
--------------------------------------------------------------------------------
I could confirm that this isn't fixed in Redmine 2.2.1.
Any news on this?
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------