feat(task): 支持修改我负责的自定义分组及任务清单侧栏分组
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 17.3k
- Forks
- 1.4k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 105
Description
背景
我在使用 lark-cli 做飞书任务中心的整理:把“我负责的”任务归类,例如:
重要且紧急、重要不紧急
飞书客户端里可以做两类操作:
- 在“我负责的”看板里,把任务移动到某个自定义分组。
- 在左侧“任务清单”区域,把多个任务清单拖入某个清单分组,例如
任务优先级
但目前在 CLI 里没有找到对应能力,只能用任务清单做部分替代,无法完全复刻客户端的分组管理效果。
当前环境
lark-cli version 1.0.66
使用身份:--as user。
已验证的现状
1. 可以读取“我负责的 / my_tasks”的自定义分组
lark-cli task sections list --resource-type my_tasks --page-all --as user --json
可以拿到 my_tasks 下的自定义分组列表。
2. 可以读取某个自定义分组里的任务,但没有移动/添加任务到分组的写操作
lark-cli task sections tasks --section-guid <section_guid> --as user --page-all --json
task sections tasks 当前是读取接口。task sections 下有 create/delete/get/list/patch/tasks,但没有类似 add_task、move_task、remove_task 的操作。
3. task tasks patch 不能更新任务所属分组
查看 schema:
lark-cli schema task.tasks.patch --format json
update_fields 当前支持的字段包括 summary、description、start、due、completed_at、extra、custom_complete、repeat_rule、mode、is_milestone、custom_fields 等,但不支持 tasklists、section_guid 或类似字段。
实际尝试通过 tasks.patch 更新 tasklists / section_guid 时也会被拒绝,错误信息里提示只允许上述任务字段更新。
4. 可以创建/重命名任务清单,但不能把清单移动到左侧“任务清单分组”
lark-cli task tasklists --help
lark-cli schema task.tasklists.patch --format json
当前 tasklists patch 主要支持 name、owner 等字段;没有发现清单所属侧栏分组、清单分组 GUID、排序位置等字段。
也没有看到类似 tasklist_groups / tasklist folders 的资源命令。
期望能力
希望 CLI 能支持以下两类能力之一或全部:
A. 修改“我负责的 / my_tasks”里任务所属的自定义分组
示例命令设想:
lark-cli task sections add_task \
--resource-type my_tasks \
--section-guid <section_guid> \
--task-guid <task_guid> \
--as user
lark-cli task sections move_task \
--resource-type my_tasks \
--from-section-guid <old_section_guid> \
--to-section-guid <new_section_guid> \
--task-guid <task_guid> \
--as user
或者在 tasks.patch 中支持类似字段:
{
"task": {
"section_guid": "<section_guid>"
},
"update_fields": ["section_guid"]
}
B. 管理左侧“任务清单”的清单分组
示例命令设想:
lark-cli task tasklist_groups list --as user
lark-cli task tasklist_groups create --name "任务优先级" --as user
lark-cli task tasklist_groups add_tasklist \
--group-guid <group_guid> \
--tasklist-guid <tasklist_guid> \
--as user
或者在 tasklists.patch 中支持清单所属分组字段。
为什么需要
这个能力对个人任务中心自动化很关键。当前 AI/脚本可以读取“我负责的”任务,也能创建任务清单并把任务加入清单,但不能完成客户端里的最终整理动作:
- 无法把任务直接移动到“我负责的”自定义分组。
- 无法把任务清单放到左侧
任务优先级分组里。
因此自动化结果会停留在“创建了几个清单”的替代方案,和用户在客户端看到的理想组织结构不一致。
当前 workaround
目前只能:
- 创建不同任务清单。
- 使用
task +tasklist-task-add把任务加入对应清单。 - 将清单重命名为四象限名称。
但这无法解决:
- “我负责的”看板自定义分组不变。
- 左侧任务清单无法通过 CLI 移入某个清单分组。
如果 CLI 能补齐上述任一能力,任务中心自动分类、个人任务看板整理、批量任务治理等场景就能完整自动化。
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the existing task sections commands and the schemas for task.tasks.patch and task.tasklists.patch; compare their read and update fields with the requested grouping operations. Confirm whether the upstream API exposes writes for my_tasks sections or task-list groups, then define the supported command scope. Done means the chosen grouping operation is exposed with schema and help coverage and can be verified through the corresponding CLI commands.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100