summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorMarius Balteanu <marius.balteanu@zitec.com>2022-05-28 09:52:48 +0000
committerMarius Balteanu <marius.balteanu@zitec.com>2022-05-28 09:52:48 +0000
commitfcf792615a272662b9dfa2ae7481cbad934c70c2 (patch)
treed22514e213ddb2920678cead343ccc31415cfe42 /app/models/issue.rb
parente09426552ce2420fd214d097f050a3c33966de66 (diff)
downloadredmine-fcf792615a272662b9dfa2ae7481cbad934c70c2.tar.gz
redmine-fcf792615a272662b9dfa2ae7481cbad934c70c2.zip
Issue#last_notes fallback does not respect notes visibility (#37155).
Patch by Jens Krämer. git-svn-id: https://svn.redmine.org/redmine/trunk@21613 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index ab9f794db..73fd3f8cd 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1168,7 +1168,7 @@ class Issue < ActiveRecord::Base
if @last_notes
@last_notes
else
- journals.where.not(notes: '').reorder(:id => :desc).first.try(:notes)
+ journals.visible.where.not(notes: '').reorder(:id => :desc).first.try(:notes)
end
end