Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#9154 closed defect (duplicate)

ticket deletion error

Reported by: sb@… Owned by: Ryan J Ollos
Priority: normal Component: AnnouncerPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description (last modified by Ryan J Ollos)

Error while deleting ticket:

Traceback (most recent call last):
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/admin/", line 107, in onecmd
    rv = cmd.Cmd.onecmd(self, line) or 0
  File "/usr/local/lib/python2.6/", line 218, in onecmd
    return self.default(line)
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/admin/", line 266, in default
    return cmd_mgr.execute_command(*args)
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/admin/", line 123, in execute_command
    return f(*fargs)
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/ticket/", line 838, in _do_remove
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/db/", line 77, in transaction_wrapper
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/ticket/", line 841, in do_remove
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/trac/ticket/", line 421, in delete
  File "build/bdist.freebsd-8.2-STABLE-amd64/egg/announcer/", line 844, in ticket_deleted
    self.env, klass, 'ticket',
NameError: global name 'page' is not defined

caused by typo in WatchSubscriber.ticket_deleted.



    old new  
    841841    def ticket_deleted(self, ticket):
    842842        klass = self.__class__.__name__
    843843        SubscriptionAttribute.delete_by_class_realm_and_target(
    844                 self.env, klass, 'ticket',
     844                self.env, klass, 'ticket',
    845845        db = self.env.get_db_cnx()
    847847    def matches(self, event):

Attachments (0)

Change History (5)

comment:1 Changed 12 years ago by sb@…

Correct patch actually looks like:

@@ -841,7 +841,7 @@
     def ticket_deleted(self, ticket):
         klass = self.__class__.__name__
-                self.env, klass, 'ticket',
+                self.env, klass, 'ticket', self._get_target_id(ticket))
         db = self.env.get_db_cnx()
     def matches(self, event):

comment:2 Changed 12 years ago by Ryan J Ollos

Description: modified (diff)
Owner: changed from Robert Corsaro to Ryan J Ollos
Status: newassigned

comment:3 Changed 11 years ago by Ryan J Ollos

Resolution: duplicate
Status: assignedclosed

Duplicate of #8577.

comment:4 Changed 11 years ago by Ryan J Ollos

Description: modified (diff)

comment:5 Changed 11 years ago by Steffen Hoffmann

(In [12304]) TracAnnouncer: Correctly convert id for ticket resources, refs #8065 and #9154.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
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.