Ticket #4715: default_reports011.diff
| File default_reports011.diff, 3.3 KB (added by vnaum@…, 4 years ago) |
|---|
-
db_default.py
180 180 FROM ticket t 181 181 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 182 182 WHERE status <> 'closed' 183 ORDER BY p.value, milestone, t.type, time183 ORDER BY """ + db.cast('p.value', 'int') + """, milestone, t.type, time 184 184 """), 185 185 #---------------------------------------------------------------------------- 186 186 ('Active Tickets by Version', … … 202 202 FROM ticket t 203 203 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 204 204 WHERE status <> 'closed' 205 ORDER BY (version IS NULL),version, p.value, t.type, time205 ORDER BY (version IS NULL),version, """ + db.cast('p.value', 'int') + """, t.type, time 206 206 """), 207 207 #---------------------------------------------------------------------------- 208 208 ('Active Tickets by Milestone', … … 224 224 FROM ticket t 225 225 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 226 226 WHERE status <> 'closed' 227 ORDER BY (milestone IS NULL),milestone, p.value, t.type, time228 """ % db.concat("'Milestone '", 'milestone')),227 ORDER BY (milestone IS NULL),milestone, %s, t.type, time 228 """ % (db.concat("'Milestone '", 'milestone'), db.cast('p.value', 'int'))), 229 229 #---------------------------------------------------------------------------- 230 230 ('Accepted, Active Tickets by Owner', 231 231 """ … … 241 241 FROM ticket t 242 242 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 243 243 WHERE status = 'accepted' 244 ORDER BY owner, p.value, t.type, time244 ORDER BY owner, """ + db.cast('p.value', 'int') + """, t.type, time 245 245 """), 246 246 #---------------------------------------------------------------------------- 247 247 ('Accepted, Active Tickets by Owner (Full Description)', … … 258 258 FROM ticket t 259 259 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 260 260 WHERE status = 'accepted' 261 ORDER BY owner, p.value, t.type, time261 ORDER BY owner, """ + db.cast('p.value', 'int') + """, t.type, time 262 262 """), 263 263 #---------------------------------------------------------------------------- 264 264 ('All Tickets By Milestone (Including closed)', … … 280 280 FROM ticket t 281 281 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 282 282 ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'), 283 (CASE status WHEN 'closed' THEN modified ELSE (-1)*p.valueEND) DESC283 (CASE status WHEN 'closed' THEN changetime ELSE (-1)*""" + db.cast('p.value', 'int') + """ END) DESC 284 284 """), 285 285 #---------------------------------------------------------------------------- 286 286 ('My Tickets', … … 299 299 FROM ticket t 300 300 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 301 301 WHERE t.status <> 'closed' AND owner = $USER 302 ORDER BY (status = 'accepted') DESC, p.value, milestone, t.type, time302 ORDER BY (status = 'accepted') DESC, """ + db.cast('p.value', 'int') + """, milestone, t.type, time 303 303 """), 304 304 #---------------------------------------------------------------------------- 305 305 ('Active Tickets, Mine first', … … 321 321 FROM ticket t 322 322 LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' 323 323 WHERE status <> 'closed' 324 ORDER BY (owner = $USER) DESC, p.value, milestone, t.type, time324 ORDER BY (owner = $USER) DESC, """ + db.cast('p.value', 'int') + """, milestone, t.type, time 325 325 """)) 326 326 327 327
