From ceb44fee7178825a7cf0fd200cc73c48dcce4e5c Mon Sep 17 00:00:00 2001 From: Holger Just Date: Thu, 5 Jul 2018 17:53:29 +0200 Subject: [PATCH] Allow to set no_notification option when receiving mails via IMAP or POP3 #29191 --- app/models/mail_handler.rb | 2 +- test/unit/mail_handler_test.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/mail_handler.rb b/app/models/mail_handler.rb index 7690dfa2b9..ecc131051c 100755 --- a/app/models/mail_handler.rb +++ b/app/models/mail_handler.rb @@ -65,7 +65,7 @@ class MailHandler < ActionMailer::Base %w(project status tracker category priority assigned_to fixed_version).each do |option| options[:issue][option.to_sym] = env[option] if env[option] end - %w(allow_override unknown_user no_permission_check no_account_notice default_group project_from_subaddress).each do |option| + %w(allow_override unknown_user no_permission_check no_account_notice no_notification default_group project_from_subaddress).each do |option| options[option.to_sym] = env[option] if env[option] end if env['private'] diff --git a/test/unit/mail_handler_test.rb b/test/unit/mail_handler_test.rb index 62875b9a01..401198fed7 100644 --- a/test/unit/mail_handler_test.rb +++ b/test/unit/mail_handler_test.rb @@ -1146,12 +1146,13 @@ class MailHandlerTest < ActiveSupport::TestCase options = MailHandler.extract_options_from_env({ 'tracker' => 'defect', 'project' => 'foo', - 'unknown_user' => 'create' + 'unknown_user' => 'create', + 'no_notification' => '1' }) assert_equal({ :issue => {:tracker => 'defect', :project => 'foo'}, - :unknown_user => 'create' + :unknown_user => 'create', :no_notification => '1' }, options) end -- 2.17.1