Thanks Ben, and sorry for the late answer. Unfortunately what I wanted only works with a custom SQL query. But I had some time lately to work on this and I finally came up with 2 queries that do the work for me. They are tailored to our use of trac - e.g. grouping by milestone or taking into account that people usually don't use the "accept" action - but still might be useful for others, so I am sharing them here:
1) My Tickets: returned
This query shows tickets that have been returned to you. Either you have created these tickets and assigned them to someone else and they have been assigned back to you or you have just owned them before and they have been assigned back to you.
SELECT p.value AS __color__,
t.milestone AS __group__,
'../milestone/' || t.milestone AS __grouplink__,
t.id AS ticket,
t.time AS created,
t.changetime AS modified,
t.summary,
t.type,
t.priority,
t.component,
t.reporter
FROM ticket t, enum p
WHERE t.status IN ('new', 'assigned', 'reopened')
AND t.owner = $USER
AND
p.name = t.priority
AND p.type = 'priority'
AND (
-- tickets that have been owned by the user, assigned to someone and assigned back
t.id IN (
SELECT DISTINCT tc.ticket
FROM ticket_change tc
WHERE tc.field = 'owner' AND tc.oldvalue = $USER
)
OR (
-- tickets that have been assigned directly to someone else and returned now
t.reporter = $USER
AND
t.id IN (
SELECT DISTINCT tc.ticket
FROM ticket_change tc
WHERE tc.field = 'owner' AND tc.newvalue = $USER
)
)
)
ORDER BY t.milestone DESC, p.value, modified DESC
2) My Tickets: new untouched
This query shows tickets, that are assigned to you, but you didn't touch them yet (no change or comment by you).
SELECT p.value AS __color__,
t.milestone AS __group__,
'../milestone/' || t.milestone AS __grouplink__,
t.id AS ticket,
t.time AS created,
t.changetime AS modified,
t.summary,
t.type,
t.priority,
t.component,
t.reporter
FROM ticket t, enum p
WHERE t.status IN ('new', 'assigned', 'reopened')
AND t.owner = $USER
AND t.reporter <> $USER
AND
p.name = t.priority
AND p.type = 'priority'
AND
-- there is no ticket_change by you, means no comment or any change, basically you didn't touch them
t.id NOT IN (
SELECT DISTINCT tc.ticket
FROM ticket_change tc
WHERE tc.author = $USER
)
ORDER BY t.milestone DESC, p.value, modified DESC
Maybe they are useful for someone.
Cheers!
Michael
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.
On Wednesday, May 23, 2012 6:19:52 PM UTC+2, netjunki wrote:
> trac-users+unsubscribe@googlegroups.com.