Exemple #1
0
 def _add_links_for_ticket(self, req, ticket):
     try:
         src_ticket_id = int(req.args['src'])
     except:
         pass
     else:
         src_ticket = AgiloTicketModelManager(self.env).get(tkt_id=src_ticket_id)
         if ticket != None and src_ticket != None:
             if src_ticket.is_link_to_allowed(ticket):
                 return src_ticket.link_to(ticket)
             else:
                 msg = 'You may not link #%d (Type %s) to #%d (Type %s)'
                 error(self, msg % (src_ticket.id, src_ticket.get_type(),
                                    ticket.id, ticket.get_type()))
Exemple #2
0
 def _add_links_for_ticket(self, req, ticket):
     try:
         src_ticket_id = int(req.args['src'])
     except:
         pass
     else:
         src_ticket = AgiloTicketModelManager(
             self.env).get(tkt_id=src_ticket_id)
         if ticket != None and src_ticket != None:
             if src_ticket.is_link_to_allowed(ticket):
                 return src_ticket.link_to(ticket)
             else:
                 msg = 'You may not link #%d (Type %s) to #%d (Type %s)'
                 error(
                     self,
                     msg % (src_ticket.id, src_ticket.get_type(), ticket.id,
                            ticket.get_type()))