在上過 David Ko 的 Kanban 課後,有學到一個有趣實用的圖表,就是累積流程圖(Cumulative Flow Diagram),本篇文章會著重在實作的部分,詳細概念的部分可以先參照 Ruddy Lee 老師分享的〈累積流程圖 Cumulative Flow Diagram 解密〉一文。
圖源:The Cumulative Flow Chart (CFD) in a nutshell – Leanguru
這個圖表的製法,可以說是要為 Product Backlog 每隔一段時間進行一次快照(snapshot),把當時各狀態有多少的 Item 給揭露出來。
但因為 Jira 只能查到當下的狀態,沒辦法溯源。所以這就仰賴我們前面在設計 Issue Type 時留下的各種時間戳(timestamp)。目前有留下的時間戳有:
透過這些時間戳,我們就能計算出特定時間點的以下狀態:
這些狀態分別可以用以下虛擬碼去理解怎麼算出來的:
To Do
COUNT(
FILTER("
`created at` <= theDate AND
(`refined at` = EMPTY || `refined at` > theDate)
")
)
To Arrange
COUNT(
FILTER("
`refined at` <= theDate AND
(`sprint began at` = EMPTY || `sprint began at` > theDate)
")
)
To Develop
COUNT(
FILTER("
`sprint began at` <= theDate AND
(`work began at` = EMPTY || `work began at` > theDate)
")
)
Developing
COUNT(
FILTER("
`work began at` <= theDate AND
(`released at` = EMPTY || `released at` > theDate)
")
)
Released
COUNT(
FILTER("
`released at` <= theDate
")
)
假設透過 Jira 下載的試算表名為 PBI
,並有以下結構:
| | A | B | C | D | F | G | H | I |
| --- | --- | ------- | ---------- | --------------- | ------------- | ----------- | -------- | ------ |
| 1 | Key | Created | Refined at | Sprint began at | Work began at | Released at | Resolved | parent |
| 2 | ... | ... | ... | ... | ... | ... | ... | ... |
| 3 | ... | ... | ... | ... | ... | ... | ... | ... |
| 4 | ... | ... | ... | ... | ... | ... | ... | ... |
並另外有一表名為 CFD
,並有以下結構:
| | A | B | C | D | F | G |
| --- | ---- | ----- | ---------- | ---------- | ---------- | -------- |
| 1 | Date | To Do | To Arrange | To Develop | Developing | Released |
| 2 | ... | ... | ... | ... | ... | ... |
| 3 | ... | ... | ... | ... | ... | ... |
| 4 | ... | ... | ... | ... | ... | ... |
| ... | ... | ... | ... | ... | ... | ... |
| 10 | ... | ... | ... | ... | ... | ... |
其中 B2 的 Google Sheet 公式即為下方程式碼區塊所示,B2 - G10 可依此類對辦理。
=COUNTA(IFNA(FILTER('PBI'!$A$2:$A, 'PBI'!$B$2:$B <= A2, 'PBI'!C2:C > A2), ))
透過這樣的公式這樣我們就能建立一個如下圖的表格與圖表。表裡的數字是我先隨意填寫的,不是真實存在的數字,但若套用在現有紀錄時間超過數週的 Jira Project,會產出有意的表格,而圖表則是累積流量圖。
這樣就成功建立了累積流程圖,讓我們能夠藉由這個圖去做對應的檢視與調適。