-- ## 13: My tasks ## -- SELECT p.value AS __color__, (CASE status WHEN 'assigned' THEN 'Assigned' ELSE 'Owned' END) AS __group__, id AS ticket, summary, component, version, milestone, t.type AS type, priority, description AS _description, changetime AS modified, time AS created, owner, reporter AS reporter FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE t.status <> 'closed' AND owner LIKE '%$USER%' ORDER BY (status = 'assigned') DESC, p.value, milestone, t.type, time