星期三, 1月 09, 2008

TRAC依使用者顯示所指定里程碑的工作狀況

以下指令可用在TRAC上建立一個「依使用者顯示所指定里程碑的工作狀況」的報告。
  • 依使用者分群
  • 依priority排序
  • 已經closed的ticket會排到最後面,同時以灰色字顯示
  • 已經assigned的以藍色底顯示

SELECT
owner AS __group__,
(CASE status WHEN 'closed' THEN 'color: #aaaaaa'
ELSE ''
END) AS __style__,
(CASE status WHEN 'assigned' THEN 4
ELSE 3
END) AS __color__,
id AS ticket,
status,
priority,
summary,
component,
t.type AS type,
time AS created,
changetime AS _changetime,
description AS _description,
reporter AS _reporter
FROM ticket t,enum p
where
p.name=t.priority AND
p.type='priority' AND
t.milestone='***里程碑***'
ORDER BY owner, (status = 'closed') ,p.value, t.type, time