プロジェクト

全般

プロフィール

Vote #67369

完了

Export issue to PDF does not include Subtasks and Related Issues

Admin Redmine さんが約3年前に追加. 約3年前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Issues_2
対象バージョン:
開始日:
2010/06/02
期日:
進捗率:

100%

予定工数:
category_id:
2
version_id:
36
issue_org_id:
5634
author_id:
660
assigned_to_id:
11192
comments:
18
status_id:
5
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

Using Redmine trunk, exporting an issue to PDF misses the new subtaks (#443) and also related task in the PDF export. (source:trunk/lib/redmine/export).


journals

--------------------------------------------------------------------------------
Thanks to Heiko this solves it for me:

<pre>
i = 0
issue.relations.select { |r| r.other_issue(issue).visible? }.each do |relation|
if i == 0
pdf.SetFontStyle('B',9)
pdf.Cell(35,5, l(relation.label_for(issue)) + ":", "LT")
pdf.SetFontStyle('', 9)
pdf.MultiCell(155,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}", "RT")
else
pdf.SetFontStyle('B',9)
pdf.Cell(35,5, l(relation.label_for(issue)) + ":", "L")
pdf.SetFontStyle('', 9)
pdf.MultiCell(155,5, "#{relation.other_issue(issue).project} - #{relation.other_issue(issue).tracker} # #{relation.other_issue(issue).id}: #{relation.other_issue(issue).subject}", "R")
end
i += 1
end
</pre>

insert above after the following block:

<pre>
for custom_value in issue.custom_field_values
pdf.SetFontStyle('B',9)
pdf.Cell(35,5, custom_value.custom_field.name + ":","L")
pdf.SetFontStyle('',9)
pdf.MultiCell(155,5, (show_value custom_value),"R")
end

</pre>

in @lib/redmine/export/pdf.rb@

--------------------------------------------------------------------------------
I took this patch and enhanced it to really show subtasks, also ancestors are shown on top
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Thanks you for the fix.
Open it can be adopted to the trunk.

The code can work on 1.1.2.
For 1.2.0, it need a little change.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hi Bernhard,

Your Patch need a little change to work with Redmine 1.2.1

Thank for your patch

Cheers
Yannick
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Hi, I rewritie note-8 patch for trunk, now.
I think to note-8 patch have some probrem.
If you wait some day, so I will post new patch.
Please wait.
--------------------------------------------------------------------------------
This is a patch for r7764.
--------------------------------------------------------------------------------
Note 12 patch line 288-298 has smart indents.
But, line 364-407 indents and truncating is ugly.
Could you rewrite?
--------------------------------------------------------------------------------
Toshi MARUYAMA wrote:
> Note 12 patch line 288-298 has smart indents.

I rewrite now.

* delete ancestor.project. Because ancestor.project is identical with issue's project.
* delete issue.subject by title. Because it is duplicate in the Cell.
* add limit for nesting.

> But, line 364-407 indents and truncating is ugly.
> Could you rewrite?

Sorry, I tried rewrite 364-407 with MultiCell now. But I give up use MultiCell.
If I use MultiCell, so I need MovePage(back to before page) method. But TCPDF didn't have this method.

I think to your implementation isn't best, but better.

I added to limit for nesting.

I attached rewrite patch for r7782.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
I committed note 14 patch in trunk r7787 and r7788.
I changed one line.
source:trunk/lib/redmine/export/pdf.rb@7788#L365

--------------------------------------------------------------------------------
Thank you!
--------------------------------------------------------------------------------
I think we can close now.
--------------------------------------------------------------------------------


related_issues

relates,Closed,8617,Indent subject of subtask ticket in exported issues PDF
duplicates,Closed,9535,Export PDF with subtask

Admin Redmine さんが約3年前に更新

  • カテゴリIssues_2 にセット
  • 対象バージョン1.3.0_36 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0