diff options
author | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-28 20:20:00 +0000 |
---|---|---|
committer | Eric Davis <edavis@littlestreamsoftware.com> | 2010-09-28 20:20:00 +0000 |
commit | 4c9f261a245b256ecd299801583ad23bb6921ec2 (patch) | |
tree | e9b5b3b30929cfeb6507d6bf32697e45d5ab3a4e /app/models | |
parent | 244e94de80751091f3ef0208dfb6b8502a6c13eb (diff) | |
download | redmine-4c9f261a245b256ecd299801583ad23bb6921ec2.tar.gz redmine-4c9f261a245b256ecd299801583ad23bb6921ec2.zip |
Added three new notifiable events based on issue attributes
* issue_note_added
* issue_status_updated
* issue_priority_updated
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4221 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/journal_observer.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/app/models/journal_observer.rb b/app/models/journal_observer.rb index 5604e064e..db7115cdb 100644 --- a/app/models/journal_observer.rb +++ b/app/models/journal_observer.rb @@ -17,6 +17,11 @@ class JournalObserver < ActiveRecord::Observer def after_create(journal) - Mailer.deliver_issue_edit(journal) if Setting.notified_events.include?('issue_updated') + if Setting.notified_events.include?('issue_updated') || + (Setting.notified_events.include?('issue_note_added') && journal.notes.present?) || + (Setting.notified_events.include?('issue_status_updated') && journal.new_status.present?) || + (Setting.notified_events.include?('issue_priority_updated') && journal.new_value_for('priority_id').present?) + Mailer.deliver_issue_edit(journal) + end end end |