我需要一份Trac报告,向我显示按截止日期分组的所有已关闭的门票。 这可能吗?
我试图使用这句话但没有运气
SELECT component,
summary,
priority,
time AS created,
strftime("%yyyy-%m-%d",time) AS __GROUP__,
t.description AS _description,
reporter AS reporter
FROM ticket t
LEFT JOIN milestone m ON m.name = t.milestone
WHERE t.status = 'closed'
ORDER BY m.due DESC
答案 0 :(得分:1)
通过搜索ticket_change
和field=resolution
的条目,可以在newvalue=closed
表格中获取故障单关闭的时间。如果重新打开并再次关闭,则单个票证可能有多个此类条目。表格记录在here。另请参阅#8728。
答案 1 :(得分:0)
这是一个有效的查询(在Trac 1.1.1中测试):
SELECT date(MAX(tc.time/1000000), 'unixepoch') as __group__,
ticket, summary
FROM ticket_change tc
LEFT JOIN ticket ON tc.ticket=id
WHERE field='status'
AND newvalue='closed'
GROUP by ticket
ORDER by tc.time
关键和棘手的比特是