import
[web.mtrack] / defaults / reports / ActiveTickets
1 SELECT
2    pri.value AS __color__,
3    (case when t.nsident is null then t.tid else t.nsident end) as ticket,
4    summary,
5    (select mtrack_group_concat(name) from
6       ticket_components tcm
7       left join components c on (tcm.compid = c.compid)
8       where tcm.tid = t.tid) as component,
9    (select mtrack_group_concat(name) from
10       ticket_milestones tm
11       left join milestones m on (tm.mid = m.mid)
12       where
13        tm.tid = t.tid
14       ) as milestone, 
15    classification as type,
16    severity,
17    creat.changedate as created
18 FROM
19    tickets t
20    left join priorities pri on (t.priority = pri.priorityname)
21    left join severities sev on (t.severity = sev.sevname)
22    left join changes creat on (t.created = creat.cid) 
23 WHERE
24  t.status in ('new', 'assigned', 'reopened')
25 ORDER BY
26  pri.value, sev.ordinal,
27  t.created
28
29
30 = Active Tickets =
31
32  * List all active tickets by priority.
33  * Color each row based on priority.
34