I got this running for "Issue Tickets" which run in the same Trac
instance as Agilo, but are not organized in a sprint but rather by a
fixed time budget.
At the moment I got a SQL report dumping the last 4 weeks and a total,
which solves my use case here. Perhaps int's interesting enough for
oyu to play with, although it does not directly solve your problem. I
use PostgreSQL as a backend.
SQL Snippet follows:
---8<---
SELECT p.value AS __color__,
id AS ticket, priority,
summary, component,
reporter, owner, resolution,
time AS created,
CASE WHEN actual.value='' THEN 0 ELSE actual.value::bigint END AS
actual,
changetime AS _changetime, description AS _description
FROM ticket t
LEFT OUTER JOIN ticket_custom actual ON (
t.id = actual.ticket AND
actual.name = 'actual_time'), enum p
WHERE status = 'closed'
AND t.type = 'incident'
AND age(to_timestamp(changetime)) < interval '4 weeks'
AND
p.name = t.priority
AND p.type = 'priority'
UNION SELECT '1' AS __color__,
null AS ticket, null AS priority,
'TOTAL' AS summary, null AS component,
null AS reporter, null AS owner, null AS resolution,
date_part('epoch', now())::integer AS created,
sum(CASE WHEN actual.value='' THEN 0 ELSE actual.value::bigint END)
AS actual,
date_part('epoch', now())::integer AS _changetime, 'TOTAL' AS
_description
FROM ticket t
LEFT OUTER JOIN ticket_custom actual ON (
t.id = actual.ticket AND
actual.name = 'actual_time'), enum p
WHERE status = 'closed'
AND t.type = 'incident'
AND age(to_timestamp(changetime)) < interval '4 weeks'
AND
p.name = t.priority
AND p.type = 'priority'
ORDER BY _changetime
--->8---
Have fun,
/k