-- ## 2: Active Tickets by Version ## -- -- {{{ -- #!html -- -- -- }}} -- -- Each block orderd by priority, type, time -- -- No system tickets. SELECT p.value AS __color__, version AS __group__, id AS ticket, summary, component, version as _version, t.type AS type, owner, reporter, status, time AS created, changetime AS modified, description AS _description FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE status <> 'closed' AND component <> 'System aspects' ORDER BY (version IS NULL),version, CAST(p.value AS int), t.type, time