プロジェクト

全般

プロフィール

Vote #79601

未完了

MailHandler ignores "Default notification option" setting

Admin Redmine さんが約4年前に追加. 約4年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Email receiving_29
対象バージョン:
-
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
29
version_id:
0
issue_org_id:
29817
author_id:
367620
assigned_to_id:
0
comments:
4
status_id:
1
tracker_id:
2
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Hi. We are using Redmine in our company and relying on its incoming email processing features.

In a case when created from inbound email (via rdm-mailhandler.rb), the new user account will be configured with "only_my_events" email notification setting which is hard-coded in MailHandler.new_user_from_attributes method as can be seen here https://github.com/redmine/redmine/blob/master/app/models/mail_handler.rb#L525

I am not sure if this is by design, should the default notification option be used instead, so such user account presets are consistent with accounts created via Redmine UI?

preconditions:

  • running Redmine server with email Webservice enabled
  • a valid parseable email message;
  • the user with the address in email FROM field should not exist
  • a project with the name referenced in rdm-handler call should exist
  • the default_notification_option setting should have any value except "only my events"

test case:
invoke rdm-handler.rb from the command line

./rdm-mailhandler.rb -u http://$HOST:$PORT -k $EMAIL_WS_API_KEY  --unknown-user create --project $PROJECT_NAME  < ./msg.txt

expected result:
the newly created user should have its mail_notification property equal to Setting.default_notification_option

observed result:

2.2.5 :007 > User.last.mail_notification
  User Load (1.2ms)  SELECT  "users".* FROM "users" WHERE "users"."type" IN ('User', 'AnonymousUser')  ORDER BY "users"."id" DESC LIMIT 1
 => "only_my_events" 
2.2.5 :008 > Setting.default_notification_option
 => "all" 

Thanks,
Eugene Dubinin


journals

--------------------------------------------------------------------------------
FYI: Jean-Philippe Lang wrote in #13341#note-2 as follows:
> It can be usefull to disable email notifications when we don't want the user to receive any emails but being able to choose between all the options is not so usefull IMO. I've the set the default to "only_my_events" in r11590.
--------------------------------------------------------------------------------
Go MAEDA wrote:
> FYI: Jean-Philippe Lang wrote in #13341#note-2 as follows:
> > It can be usefull to disable email notifications when we don't want the user to receive any emails but being able to choose between all the options is not so usefull IMO. I've the set the default to "only_my_events" in r11590.

I think we should change the current behaviour and use the default notification option.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Closed,13341,Mail handler: --no-notification option to disable notifications to the created user

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0