Feature #7017
closedAdd watchers from To and Cc fields in issue replies
0%
Description
If this preference is true watchers are added to an issue from the to: and cc: fields of an issue email reply.
Files
Related issues
Updated by Stanislav German-Evtushenko almost 14 years ago
Patches usually aren't accepted without tests.
Updated by Deoren Moor almost 11 years ago
+1
This behavior would be very beneficial to our group.
Updated by Jean-Baptiste Barth about 10 years ago
Can anybody explain me this patch like I'm 5 ? What's the current behaviour, and what's the new proposed one ?
It would add "to/cc" persons in an incoming email as watchers of the issue automatically ??
Updated by Josef Reichardt about 10 years ago
I haven't tested the patch (because I hope it will be merged into redmine core), but the current behaviour is: Users are added as watcher from to/cc if you create an issue by email. But if you reply to an email from redmine (to add a comment to the issue) the additional to/cc users from this second email aren't added as watcher.
Updated by Michael Esemplare about 10 years ago
Looking at the mail_handler today, MailHandler.receive_issue calls add_watchers(issue) before saving the issue off so email's entered in the To: and CC: fields will be added as watchers and can reply to the email.
This patch puts add_watchers(issue) in MailHandler.receive_issue_reply (I think) after the issue was saved. Therefore the watchers will be added, but not notified of the issue update. I am skeptical that behavior was intended by the patch. I would call add_watchers before saving the issue.
Would there be any repercussions to:
--- app/models/mail_handler.rb 2014-07-14 21:54:18.578473500 -0700
+++ app/models/mail_handler.rb 2014-09-11 22:44:16.975595000 -0700
@@ -231,6 +231,9 @@
issue.safe_attributes = issue_attributes_from_keywords(issue)
issue.safe_attributes = {'custom_field_values' => custom_field_values_from_keywords(issue)}
journal.notes = cleaned_up_text_body
+
+ # add To and Cc as watchers before saving so the watchers can reply to Redmine
+ add_watchers(issue)
add_attachments(issue)
issue.save!
if logger
Does the add_watcher method in acts_as_watchable automatically handle duplicates?
Updated by Sebastian Paluch almost 9 years ago
+100
Please include this tiny patch into official release, it is annoying when people are adding others in CC, email traffic grows but when update is done in Redmine some users are not informed.
Updated by Go MAEDA almost 9 years ago
I don't think we have to add a new setting to enable / disable the feature.
When you create an issue via email, there is no setting to determine if users included in CC are added as watchers. They are always added as watchers in this case. To maintain consistency, when updating an issue the same behavior should apply. The more settings we have the more complex things become.
Updated by Sebastian Paluch almost 9 years ago
Go MAEDA wrote:
I don't think we have to add a new setting to enable / disable the feature.
When you create an issue via email, there is no setting to determine if users included in CC are added as watchers. They are always added as watchers in this case. To maintain consistency, when updating an issue the same behavior should apply. The more settings we have the more complex things become.
The thing is that users from CC are not always added as watchers. This works only for new issues but does not works for reply/updates. This patch fixes the issue by adding add_watchers(issue)
in mail_handler.rb.
Updated by Deoren Moor almost 9 years ago
Go MAEDA wrote:
They are always added as watchers
Sorry if this is a tangent that deserves its own issue, but I thought it might be relevant to the discussion:
For emails that are scraped and placed into a specific project (that most users do not have access to) by the scraping script it appears that the CC field is ignored for new issues/tickets. I've not tested the functionality by temporarily allowing ALL users into the project, so this might be an edge case that most folks don't care about.
Example:
rake -f /opt/redmine/Rakefile redmine:email:receive_imap \ RAILS_ENV="development" \ port=993 \ ssl=1 \ host=imap.example.com \ folder=Inbox \ username=redmine@example.com \ password=SomethingSecret \ project=unassigned \ category=unassigned \ tracker=support \ no_permission_check=1 \ unknown_user=accept \ move_on_success=processed_emails \ move_on_failure=rejected_emails \ allow_override=project,tracker,priority,category,status,resolution
Updated by Jean-Philippe Lang almost 9 years ago
- Tracker changed from Patch to Feature
- Subject changed from add watchers from to: and cc: fields in email replies to Add watchers from To and Cc fields in issue replies
- Status changed from New to Closed
- Assignee set to Jean-Philippe Lang
- Resolution set to Fixed
Go MAEDA wrote:
I don't think we have to add a new setting to enable / disable the feature.
Agreed, cange done in r15092 without adding a setting for this.
Updated by Jean-Philippe Lang almost 9 years ago
Deoren Moor wrote:
Sorry if this is a tangent that deserves its own issue, but I thought it might be relevant to the discussion:
For emails that are scraped and placed into a specific project by the scraping script (that most users do not have access to) it appears that the CC field is ignored for new issues/tickets. I've not tested the functionality by temporarily allowing ALL users into the project, so this might be an edge case that most folks don't care about.
Watchers were not added if the user is not allowed to add watchers in the target project. I guess this is why watchers are not added in your case. This should be fixed in r15093.
Updated by Toshi MARUYAMA almost 9 years ago
- Status changed from Closed to Reopened
I think mail recipients who do not have "View watchers list" permission can see watches as CC.
For example, non members on redmine.org do not have "View watchers list" permission.
Updated by Jean-Philippe Lang over 8 years ago
- Assignee changed from Jean-Philippe Lang to Toshi MARUYAMA
Toshi MARUYAMA wrote:
I think mail recipients who do not have "View watchers list" permission can see watches as CC.
For example, non members on redmine.org do not have "View watchers list" permission.
How is it related to this issue? The mail handler was already adding cc as watchers when creating an issue, now it behaves the same when replying to an issue. If I understand correctly, the problem you describe is about notifications, not the mail handler. Those who doesn't want to let users see watchers email addresses in notifications should use Bcc for recipients, which is the default.
Updated by Toshi MARUYAMA over 8 years ago
- File terminal.png terminal.png added
- File non-member-issue-view.png non-member-issue-view.png added
- File admin-issue-view.png admin-issue-view.png added
- File non-member-role.png non-member-role.png added
Updated by Jean-Philippe Lang over 8 years ago
- Status changed from Reopened to Closed
Thanks for your feedback. But this issue is not about notifications, it just adds cc of issue replies as watchers, just like when receiving a new issue.