source: watchlistplugin/0.12/tracwatchlist/watchlist_report.sql

Last change on this file was 6827, checked in by Martin Scharrer, 14 years ago
watchlist_report.sql
Updated to new watchlist table format (1).
File size: 654 bytes
Line 
1-- Watched tickets --
2
3-- This report lists all tickets in the users [/watchlist#tickets watchlist].
4
5SELECT p.value AS __color__,
6   (CASE status WHEN 'accepted' THEN 'Accepted' ELSE 'Owned' END) AS __group__,
7   id AS ticket, summary, component, version, milestone,
8   t.type AS type, priority, time AS created,
9   changetime AS _changetime, description AS _description,
10   reporter AS _reporter
11  FROM ticket t
12  LEFT JOIN enum p ON p.name = t.priority AND p.type = 'priority'
13  WHERE id IN (SELECT resid FROM watchlist WHERE wluser = '$USER' AND realm = 'ticket')
14  ORDER BY (status = 'accepted') DESC, CAST(p.value AS int), milestone, t.type, time
15
Note: See TracBrowser for help on using the repository browser.