-- ## 31: Query for type = "defect" or "enhancement" and priority blocker thru minor ## -- -- -- Query for type = defects or enhancements SELECT p.value AS __color__, id AS ticket, summary, component, priority, version, milestone, reporter, t.type AS type, owner, status, time AS created, changetime AS _changetime, t.description AS _description FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' WHERE t.type IN ('defect', 'enhancement') AND t.status <> 'closed' AND t.priority IN ('blocker', 'critical', 'major', 'medium', 'minor') ORDER BY priority, component, ticket DESC