-- ## 6: 全チケット (マイルストーン別, 解決済みも含む) ## -- -- -- 高度なレポートを作成するための例です。 SELECT p.value AS __color__, t.milestone AS __group__, (CASE status WHEN 'closed' THEN 'color: #777; background: #ddd; border-color: #ccc;' ELSE (CASE owner WHEN $USER THEN 'font-weight: bold' END) END) AS __style__, id AS ticket, summary AS 概要, component AS コンポーネント, status AS ステータス, resolution AS 解決方法, version AS バージョン, t.type AS 分類, priority AS 優先度, owner AS 担当者, changetime AS 更新日付, time AS _登録日付, reporter AS _報告者 FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' ORDER BY (milestone IS NULL), milestone DESC, (status = 'closed'), (CASE status WHEN 'closed' THEN changetime ELSE (-1) * CAST(p.value AS signed) END) DESC