Modify

Opened 16 years ago

Closed 15 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)

ticket_compat.nocomponent.diff (1.7 KB) - added by James Dio 16 years ago.
Patch which resolved the issue for me.

Download all attachments as: .zip

Change History (2)

Changed 16 years ago by James Dio

Patch which resolved the issue for me.

comment:1 Changed 15 years ago by anonymous

Resolution: fixed
Status: newclosed

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

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Robert Corsaro.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.