Project

General

Profile

Actions

Feature #16098

open

On relation change/add notification setting

Added by Markus Nemetz about 10 years ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Category:
Email notifications
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

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


Files


Related issues

Related to Redmine - Feature #5238: Related issues option accessible during issue creationNew2010-04-02

Actions
Related to Redmine - Feature #10792: Adding/deleting a sub-issue or some issue-relation should trigger an emailNew

Actions
Has duplicate Redmine - Feature #17208: Make relation change notifications configurableClosed

Actions
Actions #1

Updated by Toshi MARUYAMA almost 10 years ago

  • Subject changed from On relation change/add do not send mail to On relation change/add notification setting
Actions #2

Updated by Robert Pollak almost 10 years ago

Duplicated by #17208.

Actions #3

Updated by Etienne Massip almost 10 years ago

  • Has duplicate Feature #17208: Make relation change notifications configurable added
Actions #4

Updated by Zbynek Drlik over 9 years ago

+1

Actions #5

Updated by Marcel Gavalier over 9 years ago

+1

Actions #6

Updated by @ go2null over 9 years ago

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)

Actions #7

Updated by Toshi MARUYAMA about 9 years ago

  • Related to Feature #5238: Related issues option accessible during issue creation added
Actions #8

Updated by Go MAEDA almost 9 years ago

  • Related to Feature #10792: Adding/deleting a sub-issue or some issue-relation should trigger an email added
Actions #9

Updated by Kevin Palm almost 9 years ago

+1

Actions #10

Updated by Marc D. over 8 years ago

+1

Actions #11

Updated by Patryk Bar over 8 years ago

+1

Actions #12

Updated by Moh Ahmed over 7 years ago

+1

Actions #13

Updated by Marc D. over 6 years ago

+1
Maybe just add it to the Setting -> Email notifications menu

Actions #14

Updated by Jonas De Meulenaere over 6 years ago

+1

Actions #15

Updated by Christophe Portier over 5 years ago

Many users in my company complain about this
=> + at least 10

Actions #16

Updated by Tomohisa Kusukawa over 4 years ago

+1

Actions #17

Updated by Yuuki NARA over 4 years ago

+1

Actions #18

Updated by Go MAEDA over 4 years ago

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.

Actions #19

Updated by Yuuki NARA over 4 years ago

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)

Actions #20

Updated by Yuichi HARADA over 4 years ago

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.

Actions #21

Updated by Go MAEDA over 4 years ago

  • Target version set to Candidate for next major release
Actions #22

Updated by Go MAEDA over 4 years ago

  • Target version changed from Candidate for next major release to 4.2.0

Setting the target version to 4.2.0.

Actions #23

Updated by Go MAEDA over 4 years ago

  • Status changed from New to Needs feedback
  • Target version changed from 4.2.0 to Candidate for next major release

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?

$ 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
Actions #24

Updated by Go MAEDA over 4 years ago

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).

Actions #25

Updated by Yuichi HARADA over 4 years ago

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.

Actions #26

Updated by Go MAEDA over 4 years ago

  • Status changed from Needs feedback to New
Actions #27

Updated by Mischa The Evil over 4 years ago

Yuichi HARADA wrote:

[...]
I rewrote the patch.

Can you split the test like you did with the patch for #17840?

Actions #28

Updated by Yuichi HARADA over 4 years ago

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.

Actions #29

Updated by Go MAEDA about 4 years ago

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.

Actions #30

Updated by Jean-Philippe Lang about 4 years ago

  • Target version changed from 4.1.0 to 4.2.0

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.

Actions #31

Updated by Jean-Philippe Lang about 4 years ago

  • Assignee set to Jean-Philippe Lang
Actions #32

Updated by Marius BĂLTEANU about 3 years ago

  • Target version changed from 4.2.0 to 5.0.0
Actions #33

Updated by Marius BĂLTEANU almost 2 years ago

  • Target version changed from 5.0.0 to Candidate for next major release
Actions #34

Updated by Nicolas Soria 10 months ago

+1

Actions #35

Updated by Dmitry Makurin 10 months ago

The patch #36265 implements #note-30

Actions #36

Updated by Kelvin Lomberg 6 months ago

+1 for this OR #36265

Actions

Also available in: Atom PDF