I know this is bogus, but it's working for me for the moment.
--- trac/ticket/notification.py.orig 2009-06-30 15:19:00.000000000 -0400
+++ trac/ticket/notification.py
@@ -148,7 +148,16 @@ class TicketNotifyEmail(NotifyEmail):
'changes_descr': changes_descr,
'change': change_data
})
- NotifyEmail.notify(self, ticket.id, subject)
+
+ # Look for sensitive flag, and if present suppress mail entirely.
+ cursor = self.db.cursor()
+ cursor.execute("select ticket, name, value from ticket_custom where
ticket = %s and name = 'sensitive' and value = text(1)",
+ (self.ticket.id,))
+ row = cursor.fetchone()
+ if row:
+ self.env.log.info("Suppressing mail for ticket %s due to
sensitive" % self.ticket.id)
+ else:
+ NotifyEmail.notify(self, ticket.id, subject)
def format_props(self):
tkt = self.ticket
pgpZsDB2hUXxh.pgp
Description: PGP signature
