:scope => preload({:issue => :project}, :user).
joins("LEFT OUTER JOIN #{JournalDetail.table_name} ON #{JournalDetail.table_name}.journal_id = #{Journal.table_name}.id").
where("#{Journal.table_name}.journalized_type = 'Issue' AND" +
- " (#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> '')")
+ " (#{JournalDetail.table_name}.prop_key = 'status_id' OR #{Journal.table_name}.notes <> '')").uniq
before_create :split_private_notes
after_create :send_notification
assert_nil(events.detect {|e| e.event_author != user})
end
+ def test_journal_with_notes_and_changes_should_be_returned_once
+ f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
+ f.scope = ['issues']
+ events = f.events
+
+ assert_equal events, events.uniq
+ end
+
def test_files_activity
f = Redmine::Activity::Fetcher.new(User.anonymous, :project => Project.find(1))
f.scope = ['files']