def _get_search_filters(self, req): filters = [] if TicketModule(self.env).get_search_filters(req) is not None: filters.extend( [ { 'name': ticket.name, 'label':ticket.name, 'active': True } for ticket in Type.select(self.env) ] ) wikifilters = WikiModule(self.env).get_search_filters(req) if wikifilters: filters.extend( [ { 'name': f[0], 'label':f[1], 'active': True } for f in wikifilters ] ) return filters
def _ids_to_tickets(self, ids): if ids: all_types = [type.name for type in Type.select(self.env)] fields = get_fields_by_names(self.env, ['summary', 'complexity', 'owner']) tickets = [] for tkt_info in get_tickets_by_ids(self.env.get_db_cnx(), fields, ids): tkt_info['idx'] ='%02d' % all_types.index(tkt_info['type']) tickets.append(tkt_info) tickets.sort(key= lambda x: '%s %s' % (x['idx'], x['id'])) return tickets return []
def _ids_to_tickets(self, ids): if ids: all_types = [type.name for type in Type.select(self.env)] fields = get_fields_by_names(self.env, ['summary', 'complexity', 'owner']) tickets = [] for tkt_info in get_tickets_by_ids(self.env.get_db_cnx(), fields, ids): tkt_info['idx'] = '%02d' % all_types.index(tkt_info['type']) tickets.append(tkt_info) tickets.sort(key=lambda x: '%s %s' % (x['idx'], x['id'])) return tickets return []
def _get_search_filters(self, req): filters = [] if TicketModule(self.env).get_search_filters(req) is not None: filters.extend([{ 'name': ticket.name, 'label': ticket.name, 'active': True } for ticket in Type.select(self.env)]) wikifilters = WikiModule(self.env).get_search_filters(req) if wikifilters: filters.extend([{ 'name': f[0], 'label': f[1], 'active': True } for f in wikifilters]) return filters