Project

General

Profile

Actions

Feature #1757

open

Immediately send a notify email when a user is added to issue's watcher list

Added by Chaoqun Zou over 16 years ago. Updated 6 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
2008-08-07
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

Hi, Jean-Philippe, it is a great feature that you add the watcher list to the issue. By this feature, we are now able to select the members who should receive notify email about an issue.

But I think it would be more useful that redmine could send a issue's summary info to the watcher when he is added to the list. Do you think so?


Files

Redmine_Bearbeiter-aktualisiert.png (29.4 KB) Redmine_Bearbeiter-aktualisiert.png a notification option "on watchers add/edit" Henry Auffahrt, 2015-02-23 15:12
notify_watcher_when_add_or_delete_in_issue.patch (6.95 KB) notify_watcher_when_add_or_delete_in_issue.patch User Redmine, 2024-04-27 13:52

Related issues

Related to Redmine - Feature #515: Add 'watchers' pro-actively.Closed

Actions
Related to Redmine - Feature #17801: When adding watchers to an issue, you should have the possibility to notify the watchers that they have been added to the issueNew

Actions
Has duplicate Redmine - Feature #10357: Send a notification to watcher, when you add or remove his to list of watchers an existing issue.ClosedJonas De Meulenaere

Actions
Has duplicate Redmine - Feature #26529: Email notification when watcher is added and removedClosed

Actions
Actions #1

Updated by Ludovic Gasc about 16 years ago

Your first request is a duplicate of #515

Actions #2

Updated by Robert Schneider about 14 years ago

Is this implemented?

I'm wondering why one does not get an notification if he or she gets added to the watchers list. Shouldn't this be normal? Now, if I add an user to the list, I have to send them a mail 'manually' to let him or her know 'Look at this issue. Please, have a look at it/Please, post something.'

Is there a certain reason why there is no automatic notification? Or is it just not implemented yet?

Actions #3

Updated by Etienne Massip over 12 years ago

  • Assignee deleted (Jean-Philippe Lang)
Actions #4

Updated by Etienne Massip over 12 years ago

Note: #10357 also proposes to send an email to the watcher when they are removed from the list.

Actions #5

Updated by Henry Auffahrt over 9 years ago

+1
We would like this Feature. At first a simple E-Mail notification would be enough. Because if you click on the Ticket Link you be able to look through the whole ticket history. An automatically summary creation would be too error-prone.

On the new version 2.6.1 i found a useful configuration option for this:

But it didn't work. This options seems to be not implemented

Actions #7

Updated by Toshi MARUYAMA over 7 years ago

  • Has duplicate Feature #26529: Email notification when watcher is added and removed added
Actions #8

Updated by Toshi MARUYAMA over 7 years ago

  • Related to Feature #17801: When adding watchers to an issue, you should have the possibility to notify the watchers that they have been added to the issue added
Actions #9

Updated by Alberto Zatton about 7 years ago

+1

Actions #10

Updated by Heiko Böhme almost 7 years ago

+1

Actions #11

Updated by Gianni Cavallotto over 6 years ago

+1

Actions #12

Updated by Robert Röttger almost 5 years ago

+1

Actions #13

Updated by User Redmine 7 months ago

Suggest some patch. The patch was collected in file partly manually and it's better to copy-paste new code to your sources (but not auto apply).
What the patch does:
  • the notification is sent to the user when he has been added to watchers or removed from watchers.
  • the notification consists name of person who added/deleted the watcher.
  • the notification could be disabled/enebled by setting in Redmine issue_updated
Actions #14

Updated by Robert Röttger 7 months ago

User Redmine wrote in #note-13:

Suggest some patch. The patch was collected in file partly manually and it's better to copy-paste new code to your sources (but not auto apply).
What the patch does:
  • the notification is sent to the user when he has been added to watchers or removed from watchers.
  • the notification consists name of person who added/deleted the watcher.
  • the notification could be disabled/enebled by setting in Redmine issue_updated

Hi! Thanks for the contribution, I tried it with Redmine 5.1.1.stable but it didnt work, I'm getting this error:

@uri=#<URI::GID gid://redmine-app/Issue/21627>>, #<GlobalID:0x00007fe775ffde08 @uri=#<URI::GID gid://redmine-app/User/19>>]}
E, [2024-04-30T15:13:15.435997 #2024246] ERROR -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [e76309d4-8049-47ba-98c0-f6e06a875cbb] Error performing ActionMailer::MailDeliveryJob (Job ID: e76309d4-8049-47ba-98c0-f6e06a875cbb) from Async(mailers) in 56.87ms: NameError (uninitialized constant Mailer::Text

    @table = Text::Table.new
             ^^^^):
/opt/www/**/htdocs/app/models/mailer.rb:193:in `issue_watcher_delete'

Another question. In Adminstration => Setting => Notification, should there be a new checkbox or is it depending on the existing "update ticket" checkbox?

Actions #15

Updated by User Redmine 7 months ago

  • File issue_updated_checkbox.png added
Actions #16

Updated by User Redmine 7 months ago

Hi! Thanks for the contribution, I tried it with Redmine 5.1.1.stable but it didnt work, I'm getting this error:

The patch tested on Redmine 4.2.7.stable.

The error appears due to a gem that is not installed on your Redmine. To solve it, you can do only ONE of the following:
- Add to your file "Gemfile" in source folder a line: gem 'text-table' and restart your redmine
or
- From patch delete all lines with @table = Text::Table.new
One thing should help.

Another question. In Adminstration => Setting => Notification, should there be a new checkbox or is it depending on the existing "update ticket" checkbox?

No new checkbox.
Only works when "Issue updated" is checkboxed in Adminstration => Setting => Email notifications.

Actions #17

Updated by Jean-Philippe Lang 7 months ago

  • File deleted (issue_updated_checkbox.png)
Actions #18

Updated by Robert Röttger 7 months ago

thx again, I tried the 2nd option and removed the two lines. Now we got a different Error

, [2024-05-03T16:42:41.269799 #2228711] ERROR -- : [ActiveJob] [ActionMailer::MailDeliveryJob] [820c0bdd-7e0f-4824-9fa7-c98adbbafd6d] Error performing ActionMailer::MailDeliveryJob (Job ID: 820c0bdd-7e0f-4824-9fa7-c98adbbafd6d) from Async(mailers) in 36.24ms: NoMethodError (undefined method `mail_signature_for' for #<Mailer:0x00000000031880>

@mail_signature = mail_signature_for(user, issue)
^^^^^^^^^^^^^^^^
Did you mean? mail_handler_url):

Actions #19

Updated by User Redmine 7 months ago

Yes, indeed, this part of code is also non-default.
You need to delete from patch all lines with @mail_signature = mail_signature_for(user, issue)
This should be the last compatibility problem with your redmine sources.

Actions #20

Updated by Robert Röttger 7 months ago

Yes, I can confirm that this worked now. Mails are sent, thanks for your work.

Actions #21

Updated by Dmitry Nekrasov 6 months ago

Robert Röttger wrote in #note-20:

Yes, I can confirm that this worked now. Mails are sent, thanks for your work.

Can you please attach version for 5.1.1?

I removed lines, described in thread but i get this:

Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb
|index ba13e0e0..d28ac90a 100644
|--- a/app/controllers/watchers_controller.rb
|+++ b/app/controllers/watchers_controller.rb
--------------------------
File to patch: ^C
root@redmine5:/opt/redmine# patch -p0 < notify_watcher_when_add_or_delete_in_issue.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/app/controllers/watchers_controller.rb b/app/controllers/watchers_controller.rb
|index ba13e0e0..d28ac90a 100644
|--- a/app/controllers/watchers_controller.rb
|+++ b/app/controllers/watchers_controller.rb
--------------------------
File to patch: app/controllers/watchers_controller.rb
patching file app/controllers/watchers_controller.rb
patch: **** malformed patch at line 19: @@ -71,10 +81,19 @@ class WatchersController < ApplicationController
Actions #22

Updated by Robert Röttger 6 months ago

Hi,

i used the patch from comment 13 and removed all lines containing "@mail_signature = mail_signature_for(user, issue)" and "@table = Text::Table.new"
Then I applied the patch manually using copy & paste . I have not applied it automattically running patch function.

Actions

Also available in: Atom PDF