Modify

Opened 6 years ago

Closed 6 years ago

#3715 closed defect (fixed)

Update to ticket with deleted component doesn't send emails.

Reported by: jdio Owned by: doki_pen
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 jdio 6 years ago.
Patch which resolved the issue for me.

Download all attachments as: .zip

Change History (2)

Changed 6 years ago by jdio

Patch which resolved the issue for me.

comment:1 Changed 6 years ago by anonymous

  • Resolution set to fixed
  • Status changed from new to 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

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from doki_pen. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.