def delete_ticket(self, t_id): """Deletes the ticket with the given ticket id""" atm = AgiloTicketModelManager(self.env) ticket = atm.get(tkt_id=t_id) try: atm.delete(ticket) except Exception, e: print exception_to_unicode(e)
def load_ticket(self, ticket=None, t_id=None): """ Utility method to load a ticket from trac. Used to check committed changes """ assert ticket or t_id, "Supply either a ticket or and id" if ticket: t_id = ticket.id tm = AgiloTicketModelManager(self.env) tm.get_cache().invalidate(key_instance=((t_id, ), None)) t = tm.get(tkt_id=t_id) return t
def load_ticket(self, ticket=None, t_id=None): """ Utility method to load a ticket from trac. Used to check committed changes """ assert ticket or t_id, "Supply either a ticket or and id" if ticket: t_id = ticket.id tm = AgiloTicketModelManager(self.env) tm.get_cache().invalidate(key_instance=((t_id,), None)) t = tm.get(tkt_id=t_id) return t