-- ## 12: Custom T3Tools Report ## -- -- All closed tickets for T3Q, T3D, and Common 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, t.type AS type FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE status = 'closed' ORDER BY (milestone IS NULL), milestone DESC, changetime DESC, (status = 'closed'), summary