0
使用下面的查詢我可以看到JIRA中給定日期的所有issueType的問題計數(否)。JIRA:過去x(即30)天的發佈狀態計數
即。
SELECT count(*), STEP.STEP_ID
FROM (SELECT STEP_ID, ENTRY_ID
FROM OS_CURRENTSTEP
WHERE OS_CURRENTSTEP.START_DATE < '<your date>'
UNION SELECT STEP_ID, ENTRY_ID
FROM OS_HISTORYSTEP
WHERE OS_HISTORYSTEP.START_DATE < '<your date>'
AND OS_HISTORYSTEP.FINISH_DATE > '<your date>') As STEP,
(SELECT changeitem.OLDVALUE AS VAL, changegroup.ISSUEID AS ISSID
FROM changegroup, changeitem
WHERE changeitem.FIELD = 'Workflow'
AND changeitem.GROUPID = changegroup.ID
UNION SELECT jiraissue.WORKFLOW_ID AS VAL, jiraissue.id as ISSID
FROM jiraissue) As VALID,
jiraissue as JI
WHERE STEP.ENTRY_ID = VALID.VAL
AND VALID.ISSID = JI.id
AND JI.project = <proj_id>
Group By STEP.STEP_ID;
結果是
Status Count
open 12
closed 13
..... ....
我想實現的是這樣的事情居然..where總計數狀態打開和關閉的每一天。在一個月
選擇的日子,一臺
LEFT OUTER JOIN的表得到計數每一天
(左:
Date COUNT(Open) COUNT(Closed)
12-1-2012 12 1
13-1-2012 14 5
我寫的JIRA Timecharts插件做這個,但它使用起來相當繁瑣。 – mdoar
謝謝Mdoar,有沒有我可以參考的鏈接?或者可能共享查詢? – JohnFairul
哦,從這個鏈接https://studio.plugins.atlassian.com/wiki/display/TMCT/JIRA+Timecharts+Plugin ..通過任何機會我能夠知道該查詢嗎?謝謝 – JohnFairul