Modify ↓
Opened 16 years ago
Closed 16 years ago
#3715 closed defect (fixed)
Update to ticket with deleted component doesn't send emails.
Reported by: | James Dio | Owned by: | Robert Corsaro |
---|---|---|---|
Priority: | normal | Component: | AnnouncerPlugin |
Severity: | normal | Keywords: | |
Cc: | jdio@… | Trac Release: | 0.11 |
Description
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.
Attachments (1)
Change History (2)
Changed 16 years ago by
Attachment: | ticket_compat.nocomponent.diff added |
---|
comment:1 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
In the future, please make sure that you diff doesn't contain tabs, but only spaces. And also that it doesn't contain different newline characters then the original source. This can be setup in your editor if it is a reasonable editor.
Fixed in -r4427
Note: See
TracTickets for help on using
tickets.
Patch which resolved the issue for me.