Changeset 4427
- Timestamp:
- Oct 8, 2008, 8:13:18 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
announcerplugin/0.11/announcerplugin/subscribers/ticket_compat.py
r4274 r4427 5 5 from trac.config import BoolOption 6 6 import re 7 from trac.resource import ResourceNotFound 7 8 8 9 class StaticTicketSubscriber(Component): … … 99 100 100 101 if event.category in ('created', 'changed', 'attachment added'): 101 component = model.Component(self.env, ticket['component']) 102 if component.owner: 103 ## TODO: Is this an option? 104 self.log.debug("LegacyTicketSubscriber added '%s' because of rule: component owner" % (component.owner,)) 105 yield ('email', component.owner, True, None) 106 102 try: 103 # this throws an exception if the component does not exist 104 component = model.Component(self.env, ticket['component']) 105 if component.owner: 106 ## TODO: Is this an option? 107 self.log.debug("LegacyTicketSubscriber added '%s' because of rule: component owner" % (component.owner,)) 108 yield ('email', component.owner, True, None) 109 except ResourceNotFound, message: 110 self.log.warn("LegacyTicketSubscriber couldn't add component owner because component was not found, message: '%s'" % (message,)) 111 107 112 if self.always_notify_owner and ticket['owner'] and not self._check_opt_out('notify_owner', ticket['owner']): 108 113 owner = ticket['owner']
Note: See TracChangeset
for help on using the changeset viewer.