Feature #2716

User option to automatically add assignee to watchers

Added by Ве Fio over 13 years ago. Updated about 1 month ago.

Status:NewStart date:2009-02-11
Priority:NormalDue date:
Assignee:Marius BALTEANU% Done:

0%

Category:Issues
Target version:5.1.0
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.

redmine_auto_watch.7z (648 Bytes) Teddy L, 2009-02-11 12:55

101-autowatch_plugin.patch Magnifier (1.27 KB) Vitaliy Ischenko, 2009-07-06 15:40

0001-Add-option-to-auto-watch-issues-assigned-to-me.patch Magnifier (4.25 KB) Marius BALTEANU, 2022-03-19 12:47


Related issues

Related to Redmine - Feature #1737: autowatch issues Closed 2008-08-03
Related to Redmine - Feature #4347: Contributing to an issue should automatically add the use... Closed 2009-12-06
Related to Redmine - Defect #32771: Editing issues does not send notifications to previous as... Closed
Duplicated by Redmine - Feature #5561: Auto add assign person to watch list Closed 2010-05-19

History

#1 Updated by Teddy L over 13 years ago

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

#2 Updated by Ве Fio over 13 years ago

Thank you!

#3 Updated by Jerome Vanthournout over 13 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 ?)

#4 Updated by Jerome Vanthournout about 13 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 ?

#5 Updated by Teddy L about 13 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.

#6 Updated by Jerome Vanthournout about 13 years ago

Hi Teddy,

Ok, it works now.

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

#7 Updated by Vitaliy Ischenko almost 13 years ago

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

#8 Updated by Ryan Cross about 11 years ago

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

See also #1737

#9 Updated by Etienne Massip about 11 years ago

  • Category set to Issues

#10 Updated by Michael Wu over 10 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

#11 Updated by # And almost 10 years ago

Is it compactible with Redmine 2.x ?

#12 Updated by # And about 9 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.

#13 Updated by Roberto Viola almost 8 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?

#14 Updated by David Verdú over 7 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?

#15 Updated by Kevin Palm over 6 years ago

+1

#16 Updated by budo kaiman over 6 years ago

+1

#17 Updated by Tobias Fischer over 5 years ago

+1 this would be really important!

#18 Updated by Tobias Fischer over 5 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

#19 Updated by Toshi MARUYAMA over 5 years ago

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

#20 Updated by Matt V over 3 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

#21 Updated by kai b about 3 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 :)

#22 Updated by Anton Koptsev over 2 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"]

#23 Updated by Marius BALTEANU over 2 years ago

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

#24 Updated by Lucky Boy about 2 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

#25 Updated by Matt V almost 2 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

#26 Updated by Anton Koptsev almost 2 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!

#27 Updated by Matt V almost 2 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

#28 Updated by Anton Koptsev almost 2 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!

#29 Updated by Matt V almost 2 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

#30 Updated by Marius BALTEANU 2 months 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.

#31 Updated by Marius BALTEANU 2 months ago

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

#32 Updated by Marius BALTEANU 2 months ago

  • Assignee set to Marius BALTEANU

#33 Updated by Marius BALTEANU 2 months ago

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

#34 Updated by Marius BALTEANU about 1 month ago

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

Also available in: Atom PDF