Update to ticket with deleted component doesn't send emails.
|Reported by:||James Dio||Owned by:||Robert Corsaro|
If you delete a component which still has tickets associated to it and you then update the ticket, an error will be generated in your log files:
Traceback (most recent call last): File "build/bdist.linux-i686/egg/announcerplugin/api.py", line 356, in _real_send x for x in sp.get_subscriptions_for_event(evt) if x File "build/bdist.linux-i686/egg/announcerplugin/api.py", line 356, in <genexpr> x for x in sp.get_subscriptions_for_event(evt) if x File "build/bdist.linux-i686/egg/announcerplugin/subscribers/ticket_compat.py", line 101, in get_subscriptions_for_event component = model.Component(self.env, ticket['component']) File "/usr/lib/python2.5/site-packages/Trac-0.11stable_r7511-py2.5.egg/trac/ticket/model.py", line 519, in __init__ name=name)) ResourceNotFound: Component component1 does not exist.
No notification emails are sent.
I have created a patch for this. Python is not one my "primary" languages so if you want to use the attached patch, look it over first, however it has resolved the issue for me.