Opened 4 years ago

Last modified 3 years ago

#7998 new defect

LegacyTicket preferences do not have any effect

Reported by: Mazda86 Owned by: doki_pen
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11


Using Trac 0.11.7 and Python 2.4.6, and the latest 0.11 version of AnnouncerPlugin, I find that no combination of settings in trac.ini or in user Announcements preferences results in anything but maximum email.

A simple patch fixes this:

@@ -146,7 +146,7 @@
                 if notify is None:
                     notify = self.always_notify_component_owner
-                if notify:
+                if notify == 'True':
                     self._log_sub(component.owner, True,
                     return ('email', component.owner, True, None)
@@ -160,7 +160,7 @@
             notify = self._check_user_setting('notify_owner', ticket['owner'])
             if notify is None:
                 notify = self.always_notify_owner
-            if notify:
+            if notify == 'True':
                 owner = ticket['owner']
                 if '@' in owner:
                     name, authenticated, address = None, False, owner
@@ -174,7 +174,7 @@
             notify = self._check_user_setting('notify_reporter', ticket['reporter'])
             if notify is None:
                 notify = self.always_notify_reporter
-            if notify:
+            if notify == 'True':
                 reporter = ticket['reporter']
                 if '@' in reporter:
                     name, authenticated, address = None, False, reporter
@@ -188,7 +188,7 @@
             notify = self._check_user_setting('notify_updater',
             if notify is None:
                 notify = self.always_notify_updater
-            if notify:
+            if notify == 'True':
                 self._log_sub(, True, 'always_notify_updater')
                 return ('email',, True, None)

Attachments (0)

Change History (3)

comment:1 Changed 4 years ago by Mazda86

Neglected to mention the affected file:


comment:2 Changed 4 years ago by doki_pen

Thanks, I'll look when I have time (next 2 weeks, probably)

comment:3 Changed 3 years ago by sailorickm

I spent a few hours trying to get the configuration working with LegacyTicketSubscriber enabled, then went searching here for bug reports and found this one. The simple patch above fixed it for me (trac 0.11.7, AnnouncerPlugin 0.11.1). Perhaps the source could be fixed? I looked at the trunk to see if the fix is there, but the code seems to have been completely rewritten. I don't see at all.

Add Comment

Modify Ticket

as new The owner will remain doki_pen.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.