Ticket #3093 (closed defect: duplicate)
reduce useless emails by not sending to the person causing the notification
| Reported by: | anonymous | Owned by: | eblot |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | ticket system | Version: | 0.10.3 |
| Severity: | normal | Keywords: | notification |
| Cc: | pacopablo@… |
Description
When using email notification of ticket changes, Trac emails the person causing the changes if they are the owner or requestor. This is useless since the person causing the notification should be aware that they are actually making changes to the ticket.
The fix is relatively simple:
in Notify.py: near line 166: change: "def notify(self, ticket, newticket=True, modtime=0):" to: "def notify(self, req, ticket, newticket=True, modtime=0):
self.req = req"
near line 145: change: "self.server.sendmail(self.from_email, [rcpt], msg.as_string())" to: "if(rcpt != self.email_map[self.req.authname]):
self.server.sendmail(self.from_email, [rcpt], msg.as_string())"
in ticket/web_ui.py: near line 144: change: "tn.notify(ticket, newticket=True)" to: "tn.notify(req, ticket, newticket=True)" near line 352: change: "tn.notify(ticket, newticket=False, modtime=now)" to: "tn.notify(req, ticket, newticket=False, modtime=now)"


