diff --git a/app/models/issue.rb b/app/models/issue.rb index 431574acd..1fd84210d 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -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