Changes between Initial Version and Version 1 of Ticket #6237, comment 4
- Timestamp:
- Jan 17, 2014, 5:42:25 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #6237, comment 4
initial v1 14 14 --- ttd/api.py (revision 13353) 15 15 +++ ttd/api.py (working copy) 16 @@ -8,11 +8,20 @@ 16 @@ -1,5 +1,7 @@ 17 from trac.core import Component, implements 18 from trac.ticket.api import ITicketChangeListener 19 +from datetime import datetime 20 +from trac.util.datefmt import utc 21 22 #local 23 from notification import SpecialTicketNotifyEmail 24 @@ -8,11 +10,22 @@ 17 25 implements(ITicketChangeListener) 18 26 … … 29 37 + do_mail = self.config.getbool('ttd', 'email_on_change') 30 38 + if do_mail: 39 + now = datetime.now(utc) 31 40 + mail = SpecialTicketNotifyEmail(self.env) 32 + mail.notify(ticket )41 + mail.notify(ticket, False, now) 33 42 34 43 def ticket_deleted(self, ticket): … … 36 45 + do_mail = self.config.getbool('ttd', 'email_on_delete') 37 46 + if do_mail: 47 + now = datetime.now(utc) 38 48 + mail = SpecialTicketNotifyEmail(self.env) 39 + mail.notify(ticket )49 + mail.notify(ticket, False, now) 40 50 + 41 51 }}} 42 52 43 53 I can commit this if I can get permission to do so (I get a 403 Forbidden when I attempt to do so at the moment) 54 55 Edit: Updated diff.