@zzp123/mcp-zentao 1.7.1 → 1.7.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/CHANGELOG.md CHANGED
@@ -5,6 +5,39 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [1.7.2] - 2025-11-06
9
+
10
+ ### Added
11
+ - **updateStory 工具重大增强**
12
+ - 新增29个可编辑字段支持,��全对接禅道最新API文档
13
+ - 支持需求基本信息编辑:title, product, parent, module, branch, plan, type
14
+ - 支持来源信息编辑:source, sourceNote(支持8种来源类型)
15
+ - 支持分类与优先级:category, pri, estimate
16
+ - 支持状态与阶段:stage, status
17
+ - 支持关键词与标识:keywords, color, grade
18
+ - 支持人员相关:mailto, reviewer, assignedTo, closedBy, feedbackBy
19
+ - 支持关闭相关:closedReason, duplicateStory(7种关闭原因)
20
+ - 支持评审相关:needNotReview
21
+ - 支持通知相关:notifyEmail
22
+ - 支持描述内容:spec, verify(HTML格式)
23
+ - 支持备注:comment
24
+
25
+ ### Changed
26
+ - `UpdateStoryRequest` 接口完全重构,从7个字段扩展到29个字段
27
+ - `updateStory` MCP 工具参数完全重新定义,支持所有新字段
28
+ - 添加了详细的字段注释和类型定义,提升开发体验
29
+
30
+ ### Technical
31
+ - 所有字段均为可选参数,支持部分更新
32
+ - `plan` 字段支持单个ID或数组格式
33
+ - `closedReason` 使用枚举类型确保数据正确性
34
+ - `mailto` 和 `reviewer` 字段支持数组格式
35
+
36
+ ### Benefits
37
+ - **功能完整性**:支持禅道需求管理的所有常用编辑功能
38
+ - **灵活性**:可以批量更新多个字段,也可以单独更新单个字段
39
+ - **类型安全**:完整的 TypeScript 类型定义,减少运行时错误
40
+
8
41
  ## [1.7.1] - 2025-11-06
9
42
 
10
43
  ### Fixed
package/dist/index.js CHANGED
@@ -464,14 +464,47 @@ server.tool("getProjects", {
464
464
  server.tool("updateStory", {
465
465
  storyId: z.number(),
466
466
  update: z.object({
467
+ // 基本信息
468
+ title: z.string().optional(),
469
+ product: z.number().optional(),
470
+ parent: z.number().optional(),
467
471
  module: z.number().optional(),
472
+ branch: z.number().optional(),
473
+ plan: z.union([z.number(), z.array(z.number())]).optional(),
474
+ type: z.string().optional(),
475
+ // 来源信息
468
476
  source: z.string().optional(),
469
477
  sourceNote: z.string().optional(),
470
- pri: z.number().optional(),
478
+ // 分类与优先级
471
479
  category: z.string().optional(),
480
+ pri: z.number().optional(),
472
481
  estimate: z.number().optional(),
473
- keywords: z.string().optional()
474
- })
482
+ // 状态与阶段
483
+ stage: z.string().optional(),
484
+ status: z.string().optional(),
485
+ // 关键词与标识
486
+ keywords: z.string().optional(),
487
+ color: z.string().optional(),
488
+ grade: z.number().optional(),
489
+ // 人员相关
490
+ mailto: z.array(z.string()).optional(),
491
+ reviewer: z.array(z.string()).optional(),
492
+ assignedTo: z.string().optional(),
493
+ closedBy: z.string().optional(),
494
+ feedbackBy: z.string().optional(),
495
+ // 关闭相关
496
+ closedReason: z.enum(['done', 'subdivided', 'duplicate', 'postponed', 'willnotdo', 'cancel', 'bydesign']).optional(),
497
+ duplicateStory: z.number().optional(),
498
+ // 评审相关
499
+ needNotReview: z.boolean().optional(),
500
+ // 通知相关
501
+ notifyEmail: z.string().optional(),
502
+ // 描述内容
503
+ spec: z.string().optional(),
504
+ verify: z.string().optional(),
505
+ // 备注
506
+ comment: z.string().optional()
507
+ }).describe("需求更新字段 - 根据API文档支持29个可编辑字段")
475
508
  }, async ({ storyId, update }) => {
476
509
  if (!zentaoApi)
477
510
  throw new Error("Please initialize Zentao API first");
@@ -257,13 +257,35 @@ export interface Project {
257
257
  progress: number;
258
258
  }
259
259
  export interface UpdateStoryRequest {
260
+ title?: string;
261
+ product?: number;
262
+ parent?: number;
260
263
  module?: number;
264
+ branch?: number;
265
+ plan?: number | number[];
266
+ type?: string;
261
267
  source?: string;
262
268
  sourceNote?: string;
263
- pri?: number;
264
269
  category?: string;
270
+ pri?: number;
265
271
  estimate?: number;
272
+ stage?: string;
273
+ status?: string;
266
274
  keywords?: string;
275
+ color?: string;
276
+ grade?: number;
277
+ mailto?: string[];
278
+ reviewer?: string[];
279
+ assignedTo?: string;
280
+ closedBy?: string;
281
+ feedbackBy?: string;
282
+ closedReason?: 'done' | 'subdivided' | 'duplicate' | 'postponed' | 'willnotdo' | 'cancel' | 'bydesign';
283
+ duplicateStory?: number;
284
+ needNotReview?: boolean;
285
+ notifyEmail?: string;
286
+ spec?: string;
287
+ verify?: string;
288
+ comment?: string;
267
289
  }
268
290
  export interface CreateProgramRequest {
269
291
  name?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzp123/mcp-zentao",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "禅道项目管理系统的高级API集成包,提供任务管理、Bug跟踪等功能的完整封装,专为Cursor IDE设计的MCP扩展",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",