Commits

osimons  committed 657ea3f

[svn r10514] XmlRpcPlugin: Ticket listeners was called twice, and seeing they are already called in `ticket.model.Ticket` they should not be called in RPC code.

Report & patch by Jun Omae. Closes #9046.

  • Participants
  • Parent commits a530b8a

Comments (0)

Files changed (1)

File trunk/tracrpc/ticket.py

                     "non-current timestamp (%r)", req.authname, when)
             when = None
         t.insert(when=when)
-        # Call ticket change listeners
-        ts = TicketSystem(self.env)
-        for listener in ts.change_listeners:
-            listener.ticket_created(t)
         if notify:
             try:
                 tn = TicketNotifyEmail(self.env)
                 # Apply workflow side-effects
                 for controller in controllers:
                     controller.apply_action_side_effects(req, t, action)
-                # Call ticket change listeners
-                for listener in ts.change_listeners:
-                    listener.ticket_changed(t, comment, author, t._old)
         if notify:
             try:
                 tn = TicketNotifyEmail(self.env)
         t = model.Ticket(self.env, id)
         req.perm(t.resource).require('TICKET_ADMIN')
         t.delete()
-        ts = TicketSystem(self.env)
-        # Call ticket change listeners
-        for listener in ts.change_listeners:
-            listener.ticket_deleted(t)
 
     def changeLog(self, req, id, when=0):
         t = model.Ticket(self.env, id)