summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-05-30 06:37:52 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-05-30 06:37:52 +0000
commitdd8bef1b07579dc9c76911de580e7286b122dbfa (patch)
treeba7ef437059552a5e907b2f37ab0c54300923070 /app
parent9fb1c60ef2af523d8291da233fe909cb2fa50201 (diff)
downloadredmine-dd8bef1b07579dc9c76911de580e7286b122dbfa.tar.gz
redmine-dd8bef1b07579dc9c76911de580e7286b122dbfa.zip
Merged r21605 to 5.0-stable (#37130).
git-svn-id: https://svn.redmine.org/redmine/branches/5.0-stable@21623 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/helpers/application_helper.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 031273d44..4f2debeb7 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -1251,7 +1251,11 @@ module ApplicationHelper
end
when 'attachment'
attachments = options[:attachments] || []
- attachments += obj.attachments if obj.respond_to?(:attachments)
+ if obj.is_a?(Journal)
+ attachments += obj.journalized.attachments if obj.journalized.respond_to?(:attachments)
+ else
+ attachments += obj.attachments if obj.respond_to?(:attachments)
+ end
if attachments && attachment = Attachment.latest_attach(attachments, name)
link = link_to_attachment(attachment, :only_path => only_path, :class => 'attachment')
end