-- ## 3: Active Tickets by Milestone ## -- -- Breakdown of what's needed when. SELECT p.value AS __color__, milestone||' Release' AS __group__, id AS ticket, summary, component, version, t.type AS type, owner, status, priority as priority, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE status <> 'closed' and milestone <> '' ORDER BY milestone, p.value, t.type, time