trac report to list tickets by milestone with milestones ordered by due date

11th Jan, 2013 | trac

On my version of trac report 3 was great but ordered milestones alphabetically, rather than by due date.

The following trac sql fixes it:

SELECT p.value AS __color__,

'Milestone '||t.milestone AS __group__, AS ticket, t.summary, t.component, t.version, t.type AS type,

t.owner, t.status, t.time AS created, t.changetime AS _changetime,

t.description AS _description, t.reporter AS _reporter,

m.due AS _dueDateTime

FROM ticket t, milestone m

LEFT JOIN enum p ON = t.priority AND p.type = 'priority'

WHERE (status <> 'closed') AND ( = t.milestone)

ORDER BY (milestone IS NULL), _dueDateTime, CAST(p.value AS int), t.type, time