Changes between Initial Version and Version 1 of Ticket #6237, comment 4


Ignore:
Timestamp:
Jan 17, 2014, 5:42:25 PM (10 years ago)
Author:
Adam Dorsey - NOAA Affiliate
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #6237, comment 4

    initial v1  
    1414--- ttd/api.py  (revision 13353)
    1515+++ 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 @@
    1725     implements(ITicketChangeListener)
    1826
     
    2937+        do_mail = self.config.getbool('ttd', 'email_on_change')
    3038+        if do_mail:
     39+            now = datetime.now(utc)
    3140+            mail = SpecialTicketNotifyEmail(self.env)
    32 +            mail.notify(ticket)
     41+            mail.notify(ticket, False, now)
    3342
    3443     def ticket_deleted(self, ticket):
     
    3645+        do_mail = self.config.getbool('ttd', 'email_on_delete')
    3746+        if do_mail:
     47+            now = datetime.now(utc)
    3848+            mail = SpecialTicketNotifyEmail(self.env)
    39 +            mail.notify(ticket)
     49+            mail.notify(ticket, False, now)
    4050+
    4151}}}
    4252
    4353I 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
     55Edit: Updated diff.