PicoBot/skills/lark-okr/references/lark-okr-progress-get.md
ooodc a7883dbed9 refactor(todo): 重构待办事项管理逻辑及更新状态规则
- 移除 TodoItem 中的 priority、created_at 和 updated_at 字段
- 强制每个任务都必须有唯一 id,且由用户负责生成
- 修改合并模式逻辑,merge=true 下保留未提及的旧任务
- 支持已完成和已取消任务重新激活(状态改回 pending 或 in_progress)
- 禁止 in_progress 状态退回到 pending,必须标记为 completed 或 cancelled
- 优化状态转换校验,允许特定状态间合法切换
- 简化任务变更消息,移除详细的新增/更新/移除统计
- 更新文档和示例,明确 id 必须由用户生成和使用
- 修复和补充测试,增强状态转换和合并模式验证
- 调整任务时间戳生成逻辑,统一使用当前时间及索引
- 该变更提供更合理的任务状态机械及管理模式,提升稳定性和易用性
2026-06-13 09:22:33 +08:00

63 lines
2.1 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# okr +progress-get
> **前置条件:** 先阅读 [`lark-shared/SKILL.md`](../../lark-shared/SKILL.md) 了解认证、全局参数和安全规则。
根据进展记录 ID 获取单条 OKR 进展记录。
## 推荐命令
```bash
# 获取指定 ID 的进展记录
lark-cli okr +progress-get --progress-id 1234567890123456789
# 使用特定的用户 ID 类型
lark-cli okr +progress-get --progress-id 1234567890123456789 --user-id-type open_id
# 预览 API 调用而不实际执行
lark-cli okr +progress-get --progress-id 1234567890123456789 --dry-run
```
## 参数
| 参数 | 必填 | 默认值 | 说明 |
|------------------|----|-----------|-----------------------------------------------|
| `--progress-id` | 是 | — | 进展记录 IDint64 类型,正整数) |
| `--user-id-type` | 否 | `open_id` | 用户 ID 类型:`open_id` \| `union_id` \| `user_id` |
| `--dry-run` | 否 | — | 预览 API 调用而不实际执行。 |
| `--format` | 否 | `json` | 输出格式。 |
## 工作流程
1. 获取目标进展记录的 ID。可通过 `+cycle-detail` 获取目标和关键结果后,从中获取进展记录 ID。
2. 执行 `lark-cli okr +progress-get --progress-id "1234567890123456789"`
3. 报告结果:进展记录的 ID、修改时间、进度百分比和内容。
## 输出
返回 JSON
```json
{
"progress": {
"progress_id": "1234567890123456789",
"modify_time": "2025-01-15 10:30:00",
"content": "{...}",
"progress_rate": {
"percent": 75.0,
"status": "normal"
}
}
}
```
其中:
- `content` 字段是 JSON 字符串,为 OKR ContentBlock
富文本格式。请参考 [lark-okr-contentblock.md](lark-okr-contentblock.md) 了解详细信息。
- `progress_rate.status` 返回可读字符串:`normal`(正常)、`overdue`(逾期)、`done`(已完成)。
## 参考
- [lark-okr](../SKILL.md) -- 所有 OKR 命令(shortcut 和 API 接口)
- [lark-shared](../../lark-shared/SKILL.md) -- 认证和全局参数