SELECT p.value AS __color__, owner AS __group__, id AS ticket, summary, keywords, reporter || IF(cc, ', ' || cc, '') AS cc, component, SUBSTR(t.type, 0, 1) AS type, severity, milestone, time AS created, changetime AS _changetime, description AS _description FROM ticket t,enum p WHERE status IN ('new', 'assigned', 'reopened') AND p.name = t.priority AND p.type = 'priority' ORDER BY (owner = '$USER') DESC, owner, milestone, p.value,