@baocang/zentao-cli 0.5.1-enh.1 → 0.5.1-enh.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@baocang/zentao-cli",
3
- "version": "0.5.1-enh.1",
3
+ "version": "0.5.1-enh.2",
4
4
  "type": "module",
5
5
  "description": "禅道命令行工具,支持在你喜爱的终端里访问和操作禅道数据,对 AI Agents 友好。",
6
6
  "author": "Sun Hao <sunhao@chandao.com>",
@@ -6,13 +6,13 @@ description: 使用 ZenTao CLI 查询和维护禅道中的产品、项目、需
6
6
  description_zh: 由禅道官方(https://www.zentao.net/)提供的 ZenTao CLI,可查询与维护禅道中的产品、项目、需求、任务和 Bug,支持执行状态流转并汇总进展。适用于操作禅道数据、查询个人待办,以及安装、配置和排查 zentao-cli 问题等场景。
7
7
  description_en: Official ZenTao CLI from ZenTao (https://www.zentao.net/). Query and maintain products, projects, requirements, tasks, and bugs in ZenTao; perform status transitions and summarize progress. For operating on ZenTao data, querying personal to-dos, and installing, configuring, or troubleshooting zentao-cli issues.
8
8
  license: MIT
9
- version: 0.5.1-enh.1
9
+ version: 0.5.1-enh.2
10
10
  author: 禅道软件
11
11
  maintainer: Sun Hao <sunhao@chandao.com>
12
12
  metadata:
13
13
  repository: https://github.com/easysoft/zentao-cli.git
14
14
  keywords: [zentao, 禅道, cli, project-management]
15
- version: 0.5.1-enh.1
15
+ version: 0.5.1-enh.2
16
16
  ---
17
17
 
18
18
  # 禅道 CLI
@@ -63,6 +63,8 @@ zentao doc my-docs --space-id 1 --lib-id 2
63
63
 
64
64
  读取需求(story/epic/requirement)、任务、Bug 等对象时,在同一个操作里把正文和讨论一次取全,不要只读字段就作答:详情响应已内嵌顶层 `actions` 数组(bug/story/task/testcase/testtask/feedback/build/release/productplan),即该对象的全部操作历史与备注;详情不含历史的模块(product/project/execution/program/epic/requirement/ticket)紧接着补一条 `zentao product history <id>` 这样的历史查询。需要写备注或查看某条记录的来龙去脉时,先读全历史再回复。裸 ID 简写如 `zentao bug <id>` 等价于 `get`。
65
65
 
66
+ 多步工作流(查当日指派、Bug 交付收尾、只读批量分析、凭据卫生)见 [工作流配方](references/workflows.md);配方里的命令链是机队真实任务沉淀,先按配方走再按需调整。
67
+
66
68
  ## 通过链接读取或下载附件
67
69
 
68
70
  把禅道图片地址或附件下载链接直接传给 `zentao file read`。相对链接按当前站点解析,完整链接须匹配所选站点的协议、主机、端口和安装目录。用 `--format=json` 读取时,`data` 是 Base64 编码的文件内容。用 `--output` 下载时,CLI 将原文件保存到指定路径。
@@ -0,0 +1,44 @@
1
+ # 高频工作流配方
2
+
3
+ 机队真实任务沉淀的多步命令链;先按配方走,避免每轮重新试错。动作与参数以当前版本离线帮助为准。
4
+
5
+ ## 查"今天/某日指派给我"的对象
6
+
7
+ `my bugs` 返回的是**当前名下**清单,不等于当天新指派;两者要在答复中分开说。
8
+
9
+ ```bash
10
+ zentao my bugs --all --fields id,title,assignedTo,assignedDate,status,pri,product
11
+ # 本地过滤某日及以后指派的记录(assignedDate 由服务端写入,ISO 字符串可直接比较):
12
+ zentao my bugs --all --filter 'assignedDate>=2026-12-04' --fields id,title,status,pri
13
+ ```
14
+
15
+ - 检查 meta(`total`/`hasMore`/`truncated`)确认扫描完整;只看了第一页不要断言"没有"。
16
+ - 转派历史需要 history 权限:`E2006` 时明确"历史未完整核实",不要据此断言当天指派为 0。
17
+ - `zentao db query` 最低服务端 22.7,22.4/22.5 报 E2010,不要当替代路径。
18
+ - Bug 搜索分组只接受 1 或 2;其余编号被服务端拒绝。
19
+
20
+ ## Bug 交付收尾(备注 → 状态 → 工时 → 回读)
21
+
22
+ 一条链完成"补丁/截图已验证"的交付,最后必须回读核对:
23
+
24
+ ```bash
25
+ zentao bug comment <id> --comment '补丁 <编号> 已在 80 环境验证;现象与修复说明见截图' --image ./验证截图.png
26
+ zentao bug resolve <id> --resolution fixed --assignedTo <报告人账号> --comment '修复说明与补丁编号'
27
+ zentao task recordestimate <taskID> --data '{"date":["2026-12-04"],"consumed":["2"],"left":["0"]}'
28
+ zentao bug <id> --fields id,status,resolution,assignedTo # 回读核对 + actions 内嵌历史
29
+ ```
30
+
31
+ - `recordestimate` 的 `consumed` 是累加、`left` 是覆盖;数组按天对齐。
32
+ - 回读必须核对 `status`/`resolution`/`assignedTo` 三项,exit 0 不代表状态正确。
33
+
34
+ ## 只读批量分析
35
+
36
+ - 单个对象:`zentao bug <id>` 一次取全正文与备注历史(详情内嵌 `actions`);其余模块补 `zentao product history <id>` 这样的历史查询。
37
+ - 控制上下文体积:`--fields id,title,status,pri` 先裁剪,需要正文再逐个 get。
38
+ - 多个对象:`--ids 1,2,3 --fields ...`(部分失败时逐项 `ok/error`,`isError` 标记整体失败)。
39
+
40
+ ## 凭据卫生(无人值守前提)
41
+
42
+ - 交互登录不要用 `-p` 明文传密码(会留在 shell 历史);用交互提示或 `--password-stdin`。
43
+ - 无人值守:`ZENTAO_CREDENTIALS_FILE` 指向 0600 凭据文件(ZENTAO_URL/ACCOUNT/PASSWORD/TOKEN),Token 失效时命令自动重连一次。
44
+ - 环境变量凭据与 profile 的服务器/账号必须一致,不一致会拒绝合并。
@@ -6,7 +6,7 @@ metadata:
6
6
  author: Sun Hao <sunhao@chandao.com>
7
7
  repository: https://github.com/easysoft/zentao-cli.git
8
8
  keywords: [zentao, 禅道, tour, onboarding, tutorial, 体验, 上手]
9
- version: 0.5.1-enh.1
9
+ version: 0.5.1-enh.2
10
10
  ---
11
11
 
12
12
  # 禅道 Tour