Skip to content

Instantly share code, notes, and snippets.

@sassman
Created January 10, 2012 12:58
Show Gist options
  • Save sassman/1588965 to your computer and use it in GitHub Desktop.
Save sassman/1588965 to your computer and use it in GitHub Desktop.
trac related stuff
SELECT p.value AS __color__,
'Component '||component AS __group__,
id AS ticket, summary, milestone, version, t.type AS type,
owner, status,
time AS created,
changetime AS _changetime, description AS _description,
reporter AS _reporter
FROM ticket t
LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
WHERE status <> 'closed'
ORDER BY (component IS NULL),component, CAST(p.value AS int), t.type, time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment