We use trac for a 10 person dev/qa team.  I'm looking to build a
custom report that can show all the tickets a user has modified in the
past 7 days.  We are using Trac 0.11.5

I believe my main problem is trying to figure out how to find ANY
ticket where $USER modified. I assume once I have that, I would just
need to pair down the request for modified dates between now and
7days.  (similar to the following query)
Here is a short version of all tickets modified in past 7 days. (which
I did not write, but I comprehend)

------
SELECT p.value AS __color__, id AS ticket, summary, reporter,
(CASE WHEN strftime('%s','now') - changetime > 86400
THEN round((strftime('%s','now') - changetime)/86400,0) || ' days'
WHEN strftime('%s','now') - changetime > 3600
THEN round((strftime('%s','now') - changetime)/3600,0) || ' hours'
ELSE round((strftime('%s','now') - changetime)/60) || ' mins'
END) AS Modified,
strftime('%s','now') - changetime  as _deltatime, description AS
_description

FROM ticket t, enum p, ticket_change tc

WHERE  p.name = t.priority AND p.type = 'priority'
AND strftime('%s','now') - changetime < 86400*7
AND tc.ROWID = (SELECT MAX(tc1.ROWID) from ticket_change tc1 where
tc1.ticket = t.id)
AND t.id = tc.ticket

ORDER BY ticket DESC, _deltatime asc, p.value, milestone, t.type,
t.time
-------

-- 
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en.

Reply via email to