From b5c48c1d973c501de61e7cbd1b6f8ad9ac1f112d Mon Sep 17 00:00:00 2001 From: Marius Balteanu Date: Sun, 28 Apr 2024 06:40:12 +0000 Subject: Adds an option to send email notification when an attachment is added (#40569). Patch by Mizuki ISHIKAWA (#ishikawa999). git-svn-id: https://svn.redmine.org/redmine/trunk@22790 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/journal.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app/models') diff --git a/app/models/journal.rb b/app/models/journal.rb index 5468c8629..24c54544b 100644 --- a/app/models/journal.rb +++ b/app/models/journal.rb @@ -354,7 +354,8 @@ class Journal < ApplicationRecord (Setting.notified_events.include?('issue_status_updated') && new_status.present?) || (Setting.notified_events.include?('issue_assigned_to_updated') && detail_for_attribute('assigned_to_id').present?) || (Setting.notified_events.include?('issue_priority_updated') && new_value_for('priority_id').present?) || - (Setting.notified_events.include?('issue_fixed_version_updated') && detail_for_attribute('fixed_version_id').present?) + (Setting.notified_events.include?('issue_fixed_version_updated') && detail_for_attribute('fixed_version_id').present?) || + (Setting.notified_events.include?('issue_attachment_added') && details.any? {|d| d.property == 'attachment' && d.value }) ) Mailer.deliver_issue_edit(self) end -- cgit v1.2.3