SuperAPI AI Directory

zentao-task

General & other

View repository

Updated 10-15 22:37

About this skill

Task (任务)

CRITICAL — Before starting, you MUST first use the Read tool to read ../zentao-shared/SKILL.md, which contains authentication, permission handling, and configuration instructions

Task search tips: First distinguish whether the userspecifically specifies using the search skill, and whether they actually providequery keywords(for example, task name, keywords, fragment description). If the user specifically specifies using the search skill, or explicitly provides task query keywords, prioritize using search-type commands. If the user does not specifically specify using the search skill, and there are no query keywords in the intent, only scope conditions (for example "completed", "created by me", "assigned to me"), prioritize using list-type capabilities (task list)。

Intent distinction supplement: For expressions like "search tasks", although they literally contain "search", if there are no actual query keywords and the essence is limiting scope conditions, prioritize task list。

User identity recognition: In user identity scenarios, if the user mentions "me" (for example "assign to me", "created by me"), please obtain the relevant information of the currently logged-in user.

Friendly output: When outputting task details, it is recommended to also extract and output the relevant link fields in the command return result (if any), so that users can directly click to jump to view details.

Commands

Common Use Cases

List project tasks

# 列出项目所有任务
zentao-cli task list --project 1

# 只看我被指派的任务
zentao-cli task list --project 1 --assigned-to me

Get task details

zentao-cli task get 456

Create task

# 创建简单任务
zentao-cli task create --name "实现登录功能" --project 1 --pri 3

# 创建任务并指定负责人、预估工时
zentao-cli task create --name "代码评审" --project 1 --pri 2 --assigned-to developer-name --estimate 4

Update task

# 更新任务状态
zentao-cli task update 456 --status done

# 更新任务负责人
zentao-cli task update 456 --assigned-to another-user

# 更新任务状态为进行中
zentao-cli task update 456 --status doing

Task status values

Status Description
wait Waiting
doing In progress
done Completed
closed Closed

Priority

Level Description
1 Highest
2 High
3 Medium
4 Low

Error Handling

Common errors

Error code Description Handling method
ZEN_NOT_FOUND Task does not exist Check whether the task ID is correct
ZEN_AUTH_FAILED Authentication failed Check whether ZENTAO_TOKEN is valid
ZEN_PARAM_MISSING Missing parameter View command help to confirm required parameters

Error handling example

# 查看认证状态
zentao-cli auth status

# 验证配置
echo $ZENTAO_URL
echo $ZENTAO_TOKEN

Gotchas

  1. Only when due(deadline) is set can reminder(reminder time) be set
  2. If both start(start time) and due(deadline) are set, the start time must be less than or equal to the deadline
  3. Task ID is a globally unique identifier, not the task number (for example t104121)
  4. Delete operations are irreversible, please confirm the user's intent before executing

Examples

# 列出项目所有任务
zentao-cli task list --project 1

# 只看我被指派的任务
zentao-cli task list --project 1 --assigned-to me

# 获取任务详情
zentao-cli task get 456

# 创建任务
zentao-cli task create --name "实现登录功能" --project 1 --pri 3

# 更新任务状态
zentao-cli task update 456 --status done

Field Reference

Field Type Description
id u64 Task ID
name string Task name
project u64 Project ID it belongs to
execution u64 Execution/iteration ID it belongs to
assigned_to string Assignee Username
status string Task Status
pri u64 Priority
estimate float Estimated Hours (hours)
consumed float Consumed Hours (hours)
start string Start Time
due string Due Time
created_by string Created By
created_date string Creation Time