summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/redmine/export/pdf/issues_pdf_helper.rb2
-rw-r--r--test/functional/issues_controller_test.rb20
2 files changed, 21 insertions, 1 deletions
diff --git a/lib/redmine/export/pdf/issues_pdf_helper.rb b/lib/redmine/export/pdf/issues_pdf_helper.rb
index 15c0b43cc..81f1a8174 100644
--- a/lib/redmine/export/pdf/issues_pdf_helper.rb
+++ b/lib/redmine/export/pdf/issues_pdf_helper.rb
@@ -212,7 +212,7 @@ module Redmine
assoc[:journals].each do |journal|
pdf.SetFontStyle('B',8)
title = "##{journal.indice} - #{format_time(journal.created_on)} - #{journal.user}"
- title << " (#{l(:field_private_notes)})" if journal.private_notes?
+ title += " (#{l(:field_private_notes)})" if journal.private_notes?
pdf.RDMCell(190,5, title)
pdf.ln
pdf.SetFontStyle('I',8)
diff --git a/test/functional/issues_controller_test.rb b/test/functional/issues_controller_test.rb
index cf2a81931..9c793fdeb 100644
--- a/test/functional/issues_controller_test.rb
+++ b/test/functional/issues_controller_test.rb
@@ -2738,6 +2738,26 @@ class IssuesControllerTest < Redmine::ControllerTest
assert @response.body.starts_with?('%PDF')
end
+ def test_show_export_to_pdf_with_private_journal
+ Journal.create!(
+ :journalized => Issue.find(1),
+ :notes => 'Private notes',
+ :private_notes => true,
+ :user_id => 3
+ )
+ @request.session[:user_id] = 3
+ get(
+ :show,
+ :params => {
+ :id => 1,
+ :format => 'pdf'
+ }
+ )
+ assert_response :success
+ assert_equal 'application/pdf', @response.content_type
+ assert @response.body.starts_with?('%PDF')
+ end
+
def test_show_export_to_pdf_with_changesets
[[100], [100, 101], [100, 101, 102]].each do |cs|
issue1 = Issue.find(3)