Permalink
Browse files

using numbered indexes for group and order.

  • Loading branch information...
1 parent 7fbe473 commit cf3b970085de15e17397683272c2b13b4d160ff2 @mrjbq7 mrjbq7 committed Nov 28, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 tracstats/web_ui.py
View
@@ -1023,10 +1023,10 @@ def _process_tickets(self, req, cursor, where, since, data):
from ticket
where (resolution is null or length(resolution) = 0) """ +
where.replace('where', 'and').replace('author', 'reporter') + """
- group by component
+ group by 1
) as open using (component) """ +
where.replace('time', 't.time').replace('author', 't.reporter') + """
- group by t.component, open.total order by count desc
+ group by 1, 3 order by 2 desc
""")
rows = cursor.fetchall()
stats = []
@@ -1045,10 +1045,10 @@ def _process_tickets(self, req, cursor, where, since, data):
from ticket
where (resolution is null or length(resolution) = 0) """ +
where.replace('where', 'and').replace('author', 'reporter') + """
- group by milestone
+ group by 1
) as open using (milestone) """ +
where.replace('time', 't.time').replace('author', 't.reporter') + """
- group by t.milestone, open.total order by count desc
+ group by 1, 3 order by 2 desc
""")
rows = cursor.fetchall()
stats = []

0 comments on commit cf3b970

Please sign in to comment.