Feature #2245

Receiving an email, 'Watch' based on To or CC address of the email

Added by youngseok yi almost 9 years ago. Updated almost 8 years ago.

Status:ClosedStart date:
Priority:LowDue date:
Assignee:-% Done:

0%

Category:Email receiving
Target version:0.8
Resolution:Fixed

Description

When receiving an email, Redmine could uses the To and CC address of the email to find the corresponding user for 'Watch'.
I think this will enhance the issue submission using email.

Thanks.

Associated revisions

Revision 2077
Added by Jean-Philippe Lang almost 9 years ago

Adds To and Cc as watchers when submitting an issue by email (#2245).
Only works if the sender has the 'Add issue watchers' permission.

Revision 2195
Added by Jean-Philippe Lang almost 9 years ago

Mail handler: add watchers before sending notification (#2245).

History

#1 Updated by Jean-Philippe Lang almost 9 years ago

  • Status changed from New to Closed
  • Target version set to 0.8
  • Resolution set to Fixed

Feature added in r2077.
Note that it will only work if the sender has the 'Add issue watchers' permission.

#2 Updated by youngseok yi almost 9 years ago

It works as expected! 100%.
I'm totally satisfied with current implementation. thanks for this feature :)

Using the feature, I found another point regarding watcher that watcher could not be notified at the moment of issue creation. (similar with #398)
If watcher managed with assigned issue number, it would be hard to determine the issue number before issue creation.
This might requires too many rework on watcher system to support.

Is there any trick possible to assign watcher before issue creation?

Jean-Philippe Lang wrote:

Feature added in r2077.
Note that it will only work if the sender has the 'Add issue watchers' permission.

#3 Updated by Jean-Philippe Lang almost 9 years ago

I did it this way because watchers have already received the original email (the one that created the issue).
But watchers could be easily added before the notification is sent:
source:/trunk/app/models/mail_handler.rb@2079#L95

The problem is that watchers would receive 2 emails: the email sent by the user and the notification. Do you think it's really usefull ?

#4 Updated by youngseok yi almost 9 years ago

I'm not sure the suggestion is right approach.
As you pointed out, the weakpoint is duplicated notification. But strong point is that watcher can send instant feedback using notification from redmine without visiting redmine.

Most of my collegues tends to use e-mail rather than redmine for issue discussion and this make me hard to keep track of history on the issue. That's why I suggested watcher notified at the moment of issue creation.

Jean-Philippe Lang wrote:

The problem is that watchers would receive 2 emails: the email sent by the user and the notification. Do you think it's really usefull ?

#5 Updated by youngseok yi almost 9 years ago

Jean-Philippe Lang wrote:

I did it this way because watchers have already received the original email (the one that created the issue).
But watchers could be easily added before the notification is sent:
source:/trunk/app/models/mail_handler.rb@2079#L95

Exchanging source:/trunk/app/models/mail_handler.rb@2136#L97 with Line 99 do not send notification when issue created.
Could I get unofficial patch for watcher notification of created issue?

(Watchers miss that the issue has been created in redmine. They just tend to reply e-mail.)

#6 Updated by Jean-Philippe Lang almost 9 years ago

Oops, you need to apply the following patch too:

Index: app/models/mailer.rb
===================================================================
--- app/models/mailer.rb    (revision 2009)
+++ app/models/mailer.rb    (copie de travail)
@@ -28,6 +28,7 @@
                     'Issue-Author' => issue.author.login
     redmine_headers 'Issue-Assignee' => issue.assigned_to.login if issue.assigned_to
     recipients issue.recipients
+    cc(issue.watcher_recipients - @recipients)
     subject "[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}] (#{issue.status.name}) #{issue.subject}" 
     body :issue => issue,
          :issue_url => url_for(:controller => 'issues', :action => 'show', :id => issue)

And I think you're right, I'll do the change to the mainline.

#7 Updated by youngseok yi almost 9 years ago

Thanks, JP! r2164 is working well.

#8 Updated by Jean-Philippe Lang almost 9 years ago

Change done in r2195. Watchers are now added before the notification is sent.

#9 Updated by Jean-Philippe Lang almost 8 years ago

  • Category changed from Email notifications to Email receiving

Also available in: Atom PDF