Skip to content

Work Items zh TW

KoukeNeko edited this page Sep 9, 2026 · 4 revisions

Work Items

English · 繁體中文

涵蓋 Epic、User Story、Task 與 Issue,以及四者共用的 watch、vote、history 與 comment 操作。

指定工作項目

epic、story、task、issue 的位置參數都接受三種寫法:

42
example-project#42
https://taiga.example.com/taiga/project/example-project/issue/42

裸 ref 會套用目前選定的專案;project#ref 與網址則可以跨專案操作,不必先切換專案。

Issue

taiga issue list
taiga issue view 42
taiga issue create --subject "Fix token refresh" --type Bug
taiga issue edit 42 --status "In progress"
taiga issue assign 42 --to alice
taiga issue comment 42 --body "Ready for verification"
taiga issue close 42 --status Closed
taiga issue delete 42 --yes

Status、priority、severity 與 type 都用名稱指定,CLI 會解析成 ID;名稱找不到或對應到多筆時會分別回報 unknown_status 與 ambiguous_status,不會猜測。

close 在專案只有一個 closed status 時可以省略 --status;有多個時,互動模式會列出選項詢問, 非互動模式則要求明確指定。

User Story

taiga story list --sprint backlog
taiga story view 51
taiga story create --subject "Add refresh-token rotation"
taiga story edit 51 --status "In progress"
taiga story assign 51 --to alice --to bob
taiga story move 51 --sprint sprint-27
taiga story comment 51 --body "Ready for review"
taiga story close 51 --status Closed

story 也可以寫成 userstory 或 us。Story 支援多位 assignee,--to 可重複指定。 story move --sprint backlog 會把 Story 移回 backlog。

Task

taiga task list --story 51
taiga task view 72
taiga task create --story 51 --subject "Add API tests"
taiga task edit 72 --status "In progress"
taiga task assign 72 --to alice
taiga task unassign 72
taiga task comment 72 --body "Tests added"
taiga task done 72 --status Closed
taiga task reopen 72 --status New
taiga task move 72 --story 51
taiga task move 72 --sprint sprint-27
taiga task move 72 --sprint backlog

Task 不一定要屬於某個 Story。指定 --story 時,Task 會自動繼承該 Story 的 Sprint; --sprint backlog 會同時解除 parent Story 與 Sprint 的關聯。

Epic

taiga epic list
taiga epic view 8
taiga epic create --subject "Unify authentication"
taiga epic edit 8 --status "In progress" --assignee alice
taiga epic link 8 --story mobile-app#42
taiga epic stories 8
taiga epic unlink 8 --story mobile-app#42
taiga epic watch 8
taiga epic history 8 --type activity
taiga epic close 8
taiga epic delete 8 --yes

Epic 與 Story 是多對多關聯。link 與 unlink 接受其他專案的 Story ref 或網址,不會把 Story 當成 Epic 的單一 parent,也不會影響 Story 既有的其他 Epic 關聯。

樂觀鎖與 --base-version

所有編輯類指令都會先讀取目前的 version 再送出 PATCH。Taiga 是逐欄位比對這個版本,因此有兩種結果:

  • 期間有人改的是不同欄位:兩邊的編輯都會生效,版本號會越過你的基準。沒有東西遺失。
  • 期間有人改的是同一個欄位:寫入被拒絕,CLI 回報 occ_conflict 並以 exit code 6 結束,對方的值保留。

所以這個保證不是整筆記錄的鎖,而是「你不會默默覆寫別人剛設好的欄位」。 自動化實例 有對真實伺服器跑出來的兩種結果。

需要自行掌控時,可以用 --base-version 明確指定要以哪個版本為基礎:

taiga issue edit 42 --subject "New subject" --base-version 7

Watch、vote 與 participants

taiga issue watch 42
taiga issue unwatch 42
taiga issue watchers 42
taiga issue vote 42
taiga issue unvote 42
taiga issue voters 42
  • watch/unwatch 與 watcher list 支援 issue、story、task、epic、wiki。
  • vote/unvote 與 voter list 支援 issue、story、task、epic(wiki 沒有 voters)。

History

taiga issue history 42
taiga issue history 42 --type comment
taiga story history 51 --type activity
taiga task history 72 --page 2 --limit 20

--type 接受 all、activity 與 comment。

Comment 的編輯與復原

taiga comment edit issue 42 <history-id> --body "Corrected comment"
taiga comment delete issue 42 <history-id> --yes
taiga comment undelete issue 42 <history-id>
taiga comment versions issue 42 <history-id>

Comment 以 history entry ID 定位,可以從 history --type comment 取得。每次 mutation 之後,CLI 會回讀該 entry 確認結果(比對 edit_comment_date 或 delete_comment_date);若無法確認,回報 ambiguous_commit 而不是假設成功。

Clone this wiki locally