Defect #5211
openGantt to PDF not working with subtasking
70%
Description
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
Updated by Jeffrey Jones over 14 years ago
Confirmed with 1.0-RC1
I would stick to the spaces as it is just easier to visualize. Maybe just two spaces per indentation?
Updated by Jeffrey Jones over 14 years ago
Simple quick and dirty fix.
in lib/redmine/export/pdf.rb, find the # Tasks comment then change the following (about 6 lines down)
if i.is_a? Issue text = "#{i.tracker} #{i.id}: #{i.subject}" else
to
if i.is_a? Issue text << (" " * i.level) text << "#{i.tracker} #{i.id}: #{i.subject}" else
that will give you one space of indentation per level.
Updated by Jeffrey Jones over 14 years ago
To change the colour of parent tasks change the following (Near the bottom of the file).
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)
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)
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.
Updated by Jeffrey Jones over 14 years ago
- % Done changed from 0 to 70
I suppose those two fixes up solves most of the problem.
Just tests and the downward pointy bits left
Updated by Daniel Felix almost 12 years ago
- Status changed from New to Confirmed
I could confirm that this isn't fixed in Redmine 2.2.1.
Any news on this?
Updated by Daniel Felix almost 12 years ago
- Affected version (unused) set to 2.2.1
- Affected version set to 2.2.1