Defect #32858

Exporting issue as PDF fails when the issue has private journal

Added by Kouhei Sutou 4 months ago. Updated 4 months ago.

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

0%

Category:PDF export
Target version:4.1.1
Resolution:Fixed Affected version:

Description

If an issue that has one or more private journals, PDF export of the issue is failed with the following backtrace:

ActionView::Template::Error (can't modify frozen String):
    1: <%= raw issue_to_pdf(@issue, :journals => @journals) %>

lib/redmine/export/pdf/issues_pdf_helper.rb:215:in `block in issue_to_pdf'
lib/redmine/export/pdf/issues_pdf_helper.rb:212:in `each'
lib/redmine/export/pdf/issues_pdf_helper.rb:212:in `issue_to_pdf'
app/views/issues/show.pdf.erb:1:in `_app_views_issues_show_pdf_erb___2781995059460618483_69922049768460'
lib/redmine/sudo_mode.rb:65:in `sudo_mode'

I attach a patch to fix this.

fix-issue-with-private-jorunal-pdf-export.diff Magnifier (1.67 KB) Kouhei Sutou, 2020-01-24 02:38

Associated revisions

Revision 19458
Added by Go MAEDA 4 months ago

Exporting issue as PDF fails when the issue has private journal (#32858).

Patch by Kouhei Sutou.

Revision 19459
Added by Go MAEDA 4 months ago

Merged r19458 from trunk to 4.1-stable (#32858).

History

#1 Updated by Go MAEDA 4 months ago

  • Tracker changed from Patch to Defect
  • Status changed from New to Confirmed
  • Target version set to 4.1.1

I have confirmed this issue and it can be fixed with the attached patch.

Setting the target version to 4.1.1.

#2 Updated by Go MAEDA 4 months ago

  • Subject changed from Failed to export issue as PDF when the issue has private journal to Exporting issue as PDF fails when the issue has private journal
  • Status changed from Confirmed to Closed
  • Assignee set to Go MAEDA
  • Resolution set to Fixed

Committed the patch. Thank you for catching and fixing the issue.

Also available in: Atom PDF