Changes between Initial Version and Version 1 of Ticket #5840
- Timestamp:
- Aug 9, 2007, 8:24:31 AM (17 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #5840 – Description
initial v1 1 The syntax used in ORDER BYin the view ticket queries is not transportable to all DBMSs.1 The syntax used in `ORDER BY` in the view ticket queries is not transportable to all DBMSs. 2 2 3 I propose to use a CASE WHEN clause instead of ORDER BY (status = 'assigned) -> ORDER BY (CASE WHEN status = 'assigned' THEN 1 ELSE 2 END) DESC3 I propose to use a `CASE WHEN` clause instead of `ORDER BY (status = 'assigned')` -> `ORDER BY (CASE WHEN status = 'assigned' THEN 1 ELSE 2 END) DESC` 4 4 5 5 Here's a snippet for the new get_reports: 6 6 {{{ 7 #!python 7 8 def get_reports(db): 8 9 owner = db.concat('owner', "' *'") … … 167 168 ORDER BY (CASE WHEN owner = $USER THEN 1 ELSE 2 END), p.value, milestone, t.type, time 168 169 """ % owner)) 170 }}}