Defect #29191 ยป 0001-Allow-to-set-no_notification-option-when-receiving-m.patch
| app/models/mail_handler.rb | ||
|---|---|---|
|
%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']
|
||
| test/unit/mail_handler_test.rb | ||
|---|---|---|
|
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
|
||