Project

General

Profile

Actions

Feature #2716

open

User option to automatically add assignee to watchers

Added by Ве Fio about 15 years ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Category:
Issues
Target version:
Start date:
2009-02-11
Due date:
% Done:

0%

Estimated time:
Resolution:

Description

For simple dependencies, instead of creating tasks for every little thing, we "pass the baton" by changing the assignee. This works well, but there could be a problem:
  1. Alice opens the issue and assigns it to Bob.
  2. Bob needs information from Carol and reassigns the issue to her. Bob forgets to add himself to the watchers.
  3. Carol replies but forgets to assign the issue back to Bob. Bob is not the originator, the assignee, or a watcher, and is not notified.

Files


Related issues

Related to Redmine - Feature #1737: autowatch issuesClosed2008-08-03

Actions
Related to Redmine - Feature #4347: Contributing to an issue should automatically add the user to the watchers listClosedMarius BĂLTEANU2009-12-06

Actions
Related to Redmine - Defect #32771: Editing issues does not send notifications to previous assigneeClosed

Actions
Has duplicate Redmine - Feature #5561: Auto add assign person to watch listClosed2010-05-19

Actions
Actions #1

Updated by Teddy L about 15 years ago

You can use the plugin i made to do that if you want.

Actions #2

Updated by Ве Fio about 15 years ago

Thank you!

Actions #3

Updated by Jerome Vanthournout about 15 years ago

+1
I love this feature. For me, it seems mandatory to define the assignee as a watcher per default. Then, if the assignee wants, he can change the watcher status.

Would it be possible to integrate it in the next release (v0.9 ?)

Actions #4

Updated by Jerome Vanthournout about 15 years ago

Hi Teddy,

I wanted to try your plugin on v0.8.1. I have copied the folder redmine_auto_watch in the vendor/plugins folder, ran rake db:migrate_plugins and restart my server.
I can see your plugin in the administration plugin list.
But, when I assign a issue to user1, it is not automatically added as a watcher.

So, your plugin does not work for me. Do you know if it comes from the redmine version used, or if I missed something ?

Actions #5

Updated by Teddy L about 15 years ago

Jerome Vanthournout wrote:

...

Hi,

I just tried with 0.8.1 and it's still working.

The test1 user should not be the author of your test issue (author always receive notifications), and check your View watchers list rights.

And for info, rake db:migrate_plugins is not needed because i didn't make db modifications.

Actions #6

Updated by Jerome Vanthournout about 15 years ago

Hi Teddy,

Ok, it works now.

Thanks for your plug-in which should be integrated in the trunk version.

Actions #7

Updated by Vitaliy Ischenko almost 15 years ago

There is one issue with plugin - when assigne_to is nil
Simple fix follows

Actions #8

Updated by Ryan Cross about 13 years ago

I don't seem to be able to link tickets.

See also #1737

Actions #9

Updated by Etienne Massip almost 13 years ago

  • Category set to Issues
Actions #10

Updated by Michael Wu over 12 years ago

Hi,

Do you think when a user not in the watchers list updates the issue, should him/her be added to the watchers list automatically?

Sometimes I when I gives feedback to an issue that I am not part of, I might forget to add the issue to my watch list. But I think most of the time the user would like to watch the issue by default if he joins the discussion.

Thanks,
Michael

Actions #11

Updated by # And almost 12 years ago

Is it compactible with Redmine 2.x ?

Actions #12

Updated by # And about 11 years ago

Try it out: https://github.com/logical-and/redmine_auto_watch. Watchers added on issue update and issue create from: author, assignee, previous assignee if any.

Actions #13

Updated by Roberto Viola almost 10 years ago

Would it be difficult to extend this to be on creation per project? That is, any issue created in a certain project gets default watchers?

Actions #14

Updated by David Verdú over 9 years ago

When you create issues by sending an email to an address and then reading the email with rake redmine:email:receive_imap
the issue is created but the creator (email sender) it is not marked as watcher. Could the plugin be modified to support this feature? Is there any hook to handle when you create with receive_imap rake task?

Actions #15

Updated by Kevin Palm over 8 years ago

+1

Actions #16

Updated by budo kaiman over 8 years ago

+1

Actions #17

Updated by Tobias Fischer over 7 years ago

+1 this would be really important!

Actions #18

Updated by Tobias Fischer over 7 years ago

# And wrote:

Try it out: https://github.com/logical-and/redmine_auto_watch. Watchers added on issue update and issue create from: author, assignee, previous assignee if any.

I can confirm that the forked and enhanced version of this plugin which can be found at https://github.com/mephi-ut/redmine_auto_watch works very well for Redmine 3.3.1

Actions #19

Updated by Toshi MARUYAMA over 7 years ago

  • Related to Feature #4347: Contributing to an issue should automatically add the user to the watchers list added
Actions #20

Updated by Matt V over 5 years ago

hi guys!
can someone confirm that this plugin is compatible with redmine > 4.0.0?
we have been using Teddy L's Version so far sucessfuly with up to 3.4.6 - thanks Teddy L by the way.
Kind Regards,
Matt

Actions #21

Updated by kai b about 5 years ago

Hi, i have forked this plugin on Github and fixed Redmine 4 compatibility:

https://github.com/PewPewMeowMeow/redmine_auto_watch

Have Fun

Kai

PS: all hail Teddy L :)

Actions #22

Updated by Anton Koptsev over 4 years ago

kai b wrote:

Hi, i have forked this plugin on Github and fixed Redmine 4 compatibility:

https://github.com/PewPewMeowMeow/redmine_auto_watch

Have Fun

Kai

PS: all hail Teddy L :)

It doesn't work with version 4.0.4.stable
If you try make new issue, and assign user - it will crash.
In logs:

Parameters: {"utf8"=>"✓", "authenticity_token"=>"Vc04yOzbC6cPGklEN5cotxnXkx7i3qRd+X9VcysTcrk3JtDb6ommPRqUlBH13E2AAHqGQGCcfyGd9QlCl0sOgQ==", "form_update_triggered_by"=>"", "issue"=>{"is_private"=>"0", "tracker_id"=>"8", "subject"=>"TEST", "description"=>"", "status_id"=>"6", "priority_id"=>"2", "assigned_to_id"=>"777", "fixed_version_id"=>"", "parent_issue_id"=>"", "start_date"=>"2019-08-28", "due_date"=>"", "estimated_hours"=>"", "done_ratio"=>"0", "custom_field_values"=>{"79"=>"", "13"=>"", "62"=>"", "83"=>"", "84"=>""}, "watcher_user_ids"=>["", "4", "927"]}, "commit"=>"Make", "project_id"=>"utm-level3-ckp-okp"}

I think, trouble in this watcher_user_ids"=>["", "4", "927"]

Actions #23

Updated by Marius BĂLTEANU over 4 years ago

  • Related to Defect #32771: Editing issues does not send notifications to previous assignee added
Actions #24

Updated by Lucky Boy almost 4 years ago

Anton Koptsev wrote:

kai b wrote:

Hi, i have forked this plugin on Github and fixed Redmine 4 compatibility:

https://github.com/PewPewMeowMeow/redmine_auto_watch

It doesn't work with version 4.0.4.stable

All ok wuth 4.1
but i add

diff --git a/lib/auto_watch_hook.rb b/lib/auto_watch_hook.rb
index bc95b2f..e24e2e3 100644
--- a/lib/auto_watch_hook.rb
+++ b/lib/auto_watch_hook.rb
@@ -38,7 +38,7 @@ class AutoWatchHook < Redmine::Hook::Listener
   end

   def add_watcher_to_issue(issue, assignee)
-    return if assignee.nil? || !assignee.is_a?(User) || assignee.anonymous? || !assignee.active?
+    return if assignee.nil? || !assignee.is_a?(User) || assignee.anonymous? || !assignee.active? || assignee == issue.author

     issue.add_watcher(assignee) unless issue.watched_by?(assignee)
   end

to exclude adding author to watchers

Actions #25

Updated by Matt V over 3 years ago

hello lucky boy and Anton Koptsev!
Thanks for your input. Anton still has not acknowledged Lukes PullRequest [1] on github and I think this is a good thing. Because the creator of the issue is not added anymore. This is, however, wanted. I still dont know what the actual problem is. Errormessage is "Watchers is invalid" altough I dont see any errors in the log? Overmore the errormessage has no meaning - issue is still created and watchers are correctly set - still works if that issue gets a new owner - plugin works flawlessly except for that misleading error message.

Kind Regards,
Matt

PS: would still be great if that feature would be moved into redmine itself

[1]
https://github.com/PewPewMeowMeow/redmine_auto_watch/pull/1

Actions #26

Updated by Anton Koptsev over 3 years ago

Matt V wrote:

hello lucky boy and Anton Koptsev!
Thanks for your input. Anton still has not acknowledged Lukes PullRequest [1] on github and I think this is a good thing. Because the creator of the issue is not added anymore. This is, however, wanted. I still dont know what the actual problem is. Errormessage is "Watchers is invalid" altough I dont see any errors in the log? Overmore the errormessage has no meaning - issue is still created and watchers are correctly set - still works if that issue gets a new owner - plugin works flawlessly except for that misleading error message.

Kind Regards,
Matt

PS: would still be great if that feature would be moved into redmine itself

[1]
https://github.com/PewPewMeowMeow/redmine_auto_watch/pull/1

Hello!
Today I check this plugin (with correction by Lucky Boy). Now all work perfect. Thank you!

Actions #27

Updated by Matt V over 3 years ago

hello!
have you tried adding a new issue and then check if you are subscribed to it? For me that wasnt the case. Lucky Boys request just omits that the creator is added to watchers which is bad.

I have the correct change: change issue.assigned_to to issue.assigned_to_id - this solved the problem for me. can you please recheck the behaviour i described - I was about to send you the correct pull request.

Kind Regards,
Matt

Actions #28

Updated by Anton Koptsev over 3 years ago

Matt V wrote:

hello!
have you tried adding a new issue and then check if you are subscribed to it? For me that wasnt the case. Lucky Boys request just omits that the creator is added to watchers which is bad.

I have the correct change: change issue.assigned_to to issue.assigned_to_id - this solved the problem for me. can you please recheck the behaviour i described - I was about to send you the correct pull request.

Kind Regards,
Matt

Your pull request solved my problem. Thank you!

Actions #29

Updated by Matt V over 3 years ago

hi anton!

great to hear. if you are satisfied with the change can you please dismiss lucky boys PR and accept mine? so that your master holds the correct change.
thank you guys

Actions #30

Updated by Marius BĂLTEANU about 2 years ago

I made a patch on top of #4347 (which is now committed) to add this option to the auto watch options.

I think we can deliver this in 5.0.0.

Actions #31

Updated by Marius BĂLTEANU about 2 years ago

  • Subject changed from Automatically add assignee to watchers to User option to automatically add assignee to watchers
Actions #32

Updated by Marius BĂLTEANU about 2 years ago

  • Assignee set to Marius BĂLTEANU
Actions #33

Updated by Marius BĂLTEANU about 2 years ago

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

Updated by Marius BĂLTEANU about 2 years ago

  • Target version changed from Candidate for next major release to 5.1.0
Actions #35

Updated by Maksim Terentev about 1 year ago

Here is how I solved this problem https://www.redmine.org/plugins/tw_watchers

Actions #36

Updated by Go MAEDA 7 months ago

  • Target version changed from 5.1.0 to 6.0.0

The patch 0001-Add-option-to-auto-watch-issues-assigned-to-me.patch applied to the trunk r22322 raises an exception if you assign an issue to a group.

NoMethodError (undefined method `pref' for #<Group id: 10, login: "", hashed_password: [FILTERED], firstname: "", lastname: "A Team", admin: false, status: 1, last_login_on: nil, language: "", auth_source_id: nil, created_on: "2023-09-24 06:53:48.274311000 +0000", updated_on: "2023-09-24 06:53:48.274311000 +0000", type: "Group", mail_notification: "", salt: nil, must_change_passwd: false, passwd_changed_on: nil, twofa_scheme: nil, twofa_totp_key: nil, twofa_totp_last_used_at: nil, twofa_required: false>):

app/models/journal.rb:347:in `add_watcher'
app/models/journal.rb:104:in `save'
app/models/issue.rb:2012:in `create_journal'
app/models/issue.rb:236:in `create_or_update'
app/controllers/issues_controller.rb:671:in `block in save_issue_with_child_records'
app/controllers/issues_controller.rb:652:in `save_issue_with_child_records'
app/controllers/issues_controller.rb:207:in `update'
lib/redmine/sudo_mode.rb:61:in `sudo_mode'
Actions

Also available in: Atom PDF