-- ## 4: Current Tickets by Component ## -- SELECT p.value AS __color__, component AS __group__, id AS ticket, summary, milestone, t.type AS type, reporter, owner AS _owner, 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 milestone NOT LIKE '%Next%' AND milestone NOT LIKE '%Future%' ORDER BY (component IS NULL), component, id DESC