Commit 40e779db authored by jplang's avatar jplang

Load only last journal with notes (#1474).

git-svn-id: https://svn.redmine.org/redmine/trunk@16370 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 956b0f6e
......@@ -1083,8 +1083,7 @@ class Issue < ActiveRecord::Base
if @last_notes
@last_notes
else
notes = self.journals.visible.where.not(notes: '').to_a
notes.last.notes unless notes.empty?
journals.where.not(notes: '').reorder(:id => :desc).first.try(:notes)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment