Opened 3 years ago

Closed 22 months ago

Last modified 21 months ago

#9154 closed defect (duplicate)

ticket deletion error

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

Description (last modified by rjollos)

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 3 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 2 years ago by rjollos

  • Description modified (diff)
  • Owner changed from doki_pen to rjollos
  • Status changed from new to assigned

comment:3 Changed 22 months ago by rjollos

  • Resolution set to duplicate
  • Status changed from assigned to closed

comment:4 Changed 22 months ago by rjollos

  • Description modified (diff)

comment:5 Changed 21 months ago by hasienda

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

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.