def delete(self):
        with self.env.db_transaction as db:
            Attachment.delete_all(self.env, self.realm, self.id)
            db("DELETE FROM ticket WHERE id=%s", (self.id,))
            db("DELETE FROM ticket_change WHERE ticket=%s", (self.id,))
            db("DELETE FROM ticket_custom WHERE ticket=%s", (self.id,))

        for listener in TicketSystem(self.env).change_listeners:
            listener.ticket_deleted(self)
udate lookup dictionary id-> symbol
dataset/ETHPy150Open edgewall/trac/trac/ticket/model.py/Ticket.delete--crossover with--dataset/ETHPy150Open cmorgan/trading-with-python/lib/interactivebrokers.py/Subscriptions._rebuildIndex