id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release 4929,Sample report does not work with PostgreSQL 8.3,christian@…,Vladislav Naumov,"The included sample report does not work with pg 8.3 as integers are no longer automaticly cast to varchars. I have made two minor changes to make it work with 8,3: {{{ SELECT p.value AS __color__, (CASE status WHEN 'assigned' THEN 'Assigned' ELSE 'Owned' END) AS __group__, t.id AS ticket, summary, component, priority, time AS _created, changetime AS modified, reporter AS _reporter , CASE WHEN u.last_read_on IS NULL OR u.last_read_on < t.time THEN '[ticket:' || cast(t.id as varchar) || ' new ticket]' WHEN u.last_read_on > t.changetime THEN 'no unread' ELSE '[comment:ticket:' || cast(t.id as varchar) || ':' || ( -- fetch unread comment number SELECT CASE -- Thanks for recording parent.child relationship, guys! WHEN position('.' in oldvalue) != 0 THEN split_part(oldvalue, '.', 2) ELSE oldvalue END FROM ticket_change tc WHERE field = 'comment' AND ticket = t.id AND time > u.last_read_on ORDER BY time LIMIT 1 ) || ' unread comment]' END AS description FROM ticket t LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority' LEFT JOIN trac_unread u ON (u.id=t.id AND u.type = 'ticket' AND u.username = '$USER' ) WHERE t.status IN ('new', 'assigned', 'reopened') AND owner = '$USER' ORDER BY description, CAST(p.value AS integer), milestone, t.type, time }}} Also please note that I changed the order by clause to reflect my needs. Otherwise: Great plugin - thx",defect,closed,normal,TracUnreadPlugin,normal,fixed,,,0.11