プロジェクト

全般

プロフィール

Vote #74935

未完了

On relation change/add notification setting

Admin Redmine さんがほぼ2年前に追加. ほぼ2年前に更新.

ステータス:
New
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
開始日:
2022/05/09
期日:
進捗率:

0%

予定工数:
category_id:
9
version_id:
32
issue_org_id:
16098
author_id:
76653
assigned_to_id:
1
comments:
33
status_id:
1
tracker_id:
2
plus1:
10
affected_version:
closed_on:
affected_version_id:
ステータス-->[New]

説明

Would it be possible to enable a following feature?

  • On Relation add/Change no status mail should be sent (to be set yes/no)

Reason: It leads to spam


journals

--------------------------------------------------------------------------------
Duplicated by #17208.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
A mitigation would be to allow adding multiple relations before submitting.
Of course, adding this to the regular issue Edit would be awesome.
(There's already a request for this - Feature #5238 Related issues option accessible during issue creation)

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

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

--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1
Maybe just add it to the Setting -> Email notifications menu
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
Many users in my company complain about this
=> + at least 10
--------------------------------------------------------------------------------
+1
--------------------------------------------------------------------------------
+1

--------------------------------------------------------------------------------
I think it can be resolved if "Relation updated" checkbox is added to "Administration" > "Settings" > "Email notifications" tab. IMHO, the checkbox should have been added when #1005 was implemented in Redmine 2.4.0.

!{width: 408px; border: 1px solid #ccc;}.notified_events_relation@2x.png!

--------------------------------------------------------------------------------
Just change the one line below and email will not be sent when setting the relation.

This is just a workaround.
Of course, it is best to select a check box for email notification. #note-18

I confirmed the operation with Redmine3.4.
The same goes for 4.0.

I hope it helps

models/journal.rb
def send_notification

> (Setting.notified_events.include?('issue_priority_updated') && new_value_for('priority_id').present?)
> )
> Mailer.deliver_issue_edit(self)

to

> (Setting.notified_events.include?('issue_priority_updated') && new_value_for('priority_id').present?)
> ) && !(new_value_for('relates').present?)
> Mailer.deliver_issue_edit(self)

--------------------------------------------------------------------------------
Go MAEDA wrote:
> I think it can be resolved if "Relation updated" checkbox is added to "Administration" > "Settings" > "Email notifications" tab. IMHO, the checkbox should have been added when #1005 was implemented in Redmine 2.4.0.

Added "Relation updated" checkbox to "Administration" > "Settings" > "Email notifications" tab.
I attached a patch.

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

--------------------------------------------------------------------------------
Setting the target version to 4.2.0.
--------------------------------------------------------------------------------
Yuichi HARADA wrote:
> Added "Relation updated" checkbox to "Administration" > "Settings" > "Email notifications" tab.
> I attached a patch.

A test fails on r18582. Could you check the patch?

<pre>
$ bin/rails test test/unit/journal_observer_test.rb:178
Run options: --seed 52037

# Running:

F

Failure:
JournalObserverTest#test_create_relation_should_send_email_notification_with_issue_relation_updated [/Users/maeda/redmines/trunk/test/unit/journal_observer_test.rb:190]:
Expected: 2
Actual: 4

bin/rails test test/unit/journal_observer_test.rb:178

Finished in 3.732650s, 0.2679 runs/s, 0.5358 assertions/s.
1 runs, 2 assertions, 1 failures, 0 errors, 0 skips
</pre>

--------------------------------------------------------------------------------
Go MAEDA wrote:
> A test fails on r18582. Could you check the patch?

I think the expected value of @ActionMailer::Base.deliveries.size@ should be 4 because notification for 2 issues (both ends of the relation) are sent to 2 users (jsmith and dlopper). jsmith is the author of both issues. dlopper receives all notification of the project (his email notifications setting is "For any event on all my projects).

!{width: 639px; border: 1px solid #ccc;}.email-deliveries@2x.png!
--------------------------------------------------------------------------------
Go MAEDA wrote:
> Go MAEDA wrote:
> > A test fails on r18582. Could you check the patch?
>
> I think the expected value of @ActionMailer::Base.deliveries.size@ should be 4 because notification for 2 issues (both ends of the relation) are sent to 2 users (jsmith and dlopper). jsmith is the author of both issues. dlopper receives all notification of the project (his email notifications setting is "For any event on all my projects).

Thank you for pointing it out. The reason for the incorrect assertion result was not enough fixtures.
I rewrote the patch.
--------------------------------------------------------------------------------
Yuichi HARADA wrote:
> [...]
> I rewrote the patch.

Can you split the test like you did with the patch for #17840?
--------------------------------------------------------------------------------
Mischa The Evil wrote:
> Yuichi HARADA wrote:
> > [...]
> > I rewrote the patch.
>
> Can you split the test like you did with the patch for #17840?

Thank you for pointing it out. I split the test.
Attach the patch.
--------------------------------------------------------------------------------
Setting the target version to 4.1.0. I think it is better to deliver this feature along with #17840 in 4.1.0.

Attached is an updated patch that can be applied to the current trunk.

--------------------------------------------------------------------------------
I think that this patch doesn't solve the reported issue.
What it brings : it would let users enable notification for relations when they haven't enabled notification for all updates.
What is requested : have notifications for all updates +except+ when relations are updated

The right solution would be to add checkboxes for +all+ the possible causes of notification and let users choose.

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

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

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


related_issues

relates,New,5238,Related issues option accessible during issue creation
relates,New,10792,Adding/deleting a sub-issue or some issue-relation should trigger an email
duplicates,Closed,17208,Make relation change notifications configurable

Admin Redmine さんがほぼ2年前に更新

  • カテゴリEmail notifications_9 にセット
  • 対象バージョンCandidate for next major release_32 にセット

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

いいね!0
いいね!0