id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 2206,Milestones.py uses row[STRING]= -- this breaks my installed postgres DBI,anonymous,Christopher Lenz,"this works for me: using psyco /usr/lib/python2.3/site-packages/trac/Milestone.py +183 {{{ #!python def get_tickets_for_milestone(env, db, milestone, fields=[ 'component' ]): stdfields = TicketSystem(env).get_ticket_fields() cursor = db.cursor() sql = ""SELECT DISTINCT "" for field in fields: if field not in [f['name'] for f in stdfields if not f.get('custom')]: sql += ""%s.value AS %s, "" % (field, field) else: sql += ""ticket.%s AS %s, "" % (field, field) sql += ""ticket.id AS id, ticket.status AS status FROM ticket "" for field in fields: if field not in [f['name'] for f in stdfields if not f.get('custom')]: sql += ""LEFT OUTER JOIN ticket_custom %s ON (ticket.id=%s.ticket AND %s.name='%s') "" % (field, field, field, field) sql += ""WHERE milestone='%s' ORDER BY %s"" % (sql_escape(milestone), field) cursor.execute(sql) tickets = [] for row in cursor: # while 1: # row = cursor.fetchone() # if not row: # break c=0 ticket = {} for field in fields: ticket[field] = row[c] c = c + 1 ticket['id']=row[c] c = c + 1 ticket['status']=row[c] c = c + 1 tickets.append(ticket) return tickets }}}",defect,closed,highest,,roadmap,0.8.4,blocker,invalid,patch included,,,,,