-- ## 8: 未解決チケット(私のチケットを優先して表示) ## -- -- -- * 全ての未解決チケットを優先度順に表示します。 -- * ログインユーザが担当者になっているチケットを最初のグループで表示します。 SELECT p.value AS __color__, (CASE owner WHEN '$USER' THEN 'My Tickets' ELSE 'Active Tickets' END) AS __group__, id AS ticket, summary, component, version, milestone, t.type AS type, (CASE status WHEN 'assigned' THEN owner||' *' ELSE owner END) AS owner, time AS created, changetime AS _changetime, description AS _description, reporter AS _reporter 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, p.value, milestone, t.type, time