def ticket_changed(self, ticket, comment, author, old_values): links = None need_change = TICKETREF in old_values #com_refs = get_refs_in_comment(comment, [ticket.id]) #if com_refs: # self.log.debug("TicketRefsPlugin: refs in comment %s" % ( # str(com_refs))) # links = TicketLinks(self.env, ticket) # links.add_reference(com_refs) # need_change = True if need_change: self.log.debug("TicketRefsPlugin: ticket are changing") if not links: links = TicketLinks(self.env, ticket) try: print "will call ticketLinks.change" links.change(author, old_values.get(TICKETREF)) except Exception, err: self.log.error("TicketRefsPlugin: ticket_changed %s" % err) self.log.debug("TicketRefsPlugin: ticket are changed")