Project

General

Profile

Actions

Feature #16098

open

On relation change/add notification setting

Feature #16098: On relation change/add notification setting

Added by Markus Nemetz almost 13 years ago. Updated about 3 years ago.

Status:
New
Priority:
Normal
Category:
Email notifications
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 4 (3 open — 1 closed)

Related to Redmine - Feature #5238: Related issues option accessible during issue creationNewActions
Related to Redmine - Feature #10792: Adding/deleting a sub-issue or some issue-relation should trigger an emailNewActions
Related to Redmine - Patch #36265: More flexible options for issue notificationsNewActions
Has duplicate Redmine - Feature #17208: Make relation change notifications configurableClosedActions

Updated by Toshi MARUYAMA over 12 years ago Actions #1

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

Updated by Robert Pollak over 12 years ago Actions #2

Duplicated by #17208.

Updated by Etienne Massip over 12 years ago Actions #3

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

Updated by Zbynek Drlik about 12 years ago Actions #4

+1

Updated by Marcel Gavalier about 12 years ago Actions #5

+1

Updated by @ go2null almost 12 years ago Actions #6

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)

Updated by Toshi MARUYAMA almost 12 years ago Actions #7

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

Updated by Go MAEDA over 11 years ago Actions #8

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

Updated by Kevin Palm over 11 years ago Actions #9

+1

Updated by Marc D. about 11 years ago Actions #10

+1

Updated by Patryk Bar almost 11 years ago Actions #11

+1

Updated by Moh Ahmed about 10 years ago Actions #12

+1

Updated by Marc D. over 9 years ago Actions #13

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

Updated by Jonas De Meulenaere about 9 years ago Actions #14

+1

Updated by Christophe Portier about 8 years ago Actions #15

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

Updated by Tomohisa Kusukawa about 7 years ago Actions #16

+1

Updated by Yuuki NARA about 7 years ago Actions #17

+1

Updated by Go MAEDA about 7 years ago Actions #18

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.

Updated by Yuuki NARA about 7 years ago Actions #19

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)

Updated by Yuichi HARADA about 7 years ago Actions #20

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.

Updated by Go MAEDA about 7 years ago Actions #21

  • Target version set to Candidate for next major release

Updated by Go MAEDA about 7 years ago Actions #22

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

Setting the target version to 4.2.0.

Updated by Go MAEDA about 7 years ago Actions #23

  • 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

Updated by Go MAEDA about 7 years ago Actions #24

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

Updated by Yuichi HARADA about 7 years ago Actions #25

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.

Updated by Go MAEDA about 7 years ago Actions #26

  • Status changed from Needs feedback to New

Updated by Mischa The Evil about 7 years ago Actions #27

Yuichi HARADA wrote:

[...]
I rewrote the patch.

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

Updated by Yuichi HARADA about 7 years ago Actions #28

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.

Updated by Go MAEDA almost 7 years ago Actions #29

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.

Updated by Jean-Philippe Lang almost 7 years ago Actions #30

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

Updated by Jean-Philippe Lang almost 7 years ago Actions #31

  • Assignee set to Jean-Philippe Lang

Updated by Marius BĂLTEANU over 5 years ago Actions #32

  • Target version changed from 4.2.0 to 5.0.0

Updated by Marius BĂLTEANU over 4 years ago Actions #33

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

Updated by Nicolas Soria over 3 years ago Actions #34

+1

Updated by Dmitry Makurin over 3 years ago Actions #35

The patch #36265 implements #note-30

Updated by Kelvin Lomberg about 3 years ago Actions #36

+1 for this OR #36265

Updated by Jonas De Meulenaere about 2 years ago Actions #37

  • Related to Patch #36265: More flexible options for issue notifications added
Actions

Also available in: PDF Atom