Commit 9bb45d9e authored by Tim Felgentreff's avatar Tim Felgentreff

Fix journal_observer

parent 1a2aa363
......@@ -824,17 +824,6 @@ class Issue < ActiveRecord::Base
end
IssueJournal.class_eval do
after_create :notify_of_updates
def notify_of_updates
return if self.version == 1
if Setting.notified_events.include?('issue_updated')
Mailer.deliver_issue_edit(self)
elsif Setting.notified_events.include?('issue_note_added') and !self.notes.blank?
Mailer.deliver_issue_edit(self)
end
end
# Shortcut
def new_status
if details.keys.include? 'status_id'
......
......@@ -36,7 +36,7 @@ Rails::Initializer.run do |config|
# Activate observers that should always be running
# config.active_record.observers = :cacher, :garbage_collector
config.active_record.observers = :message_observer, :issue_observer, :news_observer, :document_observer, :wiki_content_observer
config.active_record.observers = :journal_observer, :message_observer, :issue_observer, :news_observer, :document_observer, :wiki_content_observer
# Make Active Record use UTC-base instead of local time
# config.active_record.default_timezone = :utc
......
Subproject commit 502993c2b767945a3d931acba4fbb1466db388c4
Subproject commit 62d308af1ea818c52145bf15a6f0d246c41bd127
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