-- ## 15: All Tickets assigned to release versions (including closed) ## -- -- List of '''bug reports''', '''requested features''' and '''development tickets''' sorted to the specific release tag SELECT milestone AS __group__, t.type AS __group__, (CASE status WHEN 'closed' THEN 'color: black; background: #ddd; border-color: #ccc;' ELSE (CASE t.type WHEN 'bug report' THEN (CASE priority WHEN 'high' THEN 'color: red; font-weight: bold; background: #fdd;' WHEN 'low' THEN 'color: red; font-weight: bold; background: #ffc;' ELSE 'color: red; font-weight: bold;' END) ELSE (CASE priority WHEN 'high' THEN 'background: #fdd;' WHEN 'low' THEN 'background: #ffc;' ELSE 'color: black;' END) END) END) AS __style__, id AS ticket, summary, priority, component, t.type, status, resolution, milestone, owner, changetime AS modified FROM ticket t ORDER BY milestone DESC, resolution ASC, t.type ASC, priority ASC, component ASC, id DESC