@zzp123/mcp-zentao 1.8.2 → 1.8.4
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/dist/api/zentaoApi.d.ts +3 -3
- package/dist/api/zentaoApi.js +7 -7
- package/dist/index.js +3 -3
- package/package.json +3 -1
package/dist/api/zentaoApi.d.ts
CHANGED
|
@@ -45,10 +45,10 @@ export declare class ZentaoAPI {
|
|
|
45
45
|
createPlan(productId: number, plan: CreatePlanRequest): Promise<Plan>;
|
|
46
46
|
getProjects(page?: number, limit?: number): Promise<Project[]>;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* 修改需求(使用 PUT /stories/:id 接口)
|
|
49
49
|
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
50
|
+
* 此方法使用标准的"修改需求其他字段"接口(PUT),支持修改29个字段
|
|
51
|
+
* 自动处理评审人问题,避免"该研发需求需要评审,评审人员不能为空"的错误
|
|
52
52
|
*
|
|
53
53
|
* @param storyId 需求ID
|
|
54
54
|
* @param update 需要更新的字段
|
package/dist/api/zentaoApi.js
CHANGED
|
@@ -607,10 +607,10 @@ export class ZentaoAPI {
|
|
|
607
607
|
}
|
|
608
608
|
}
|
|
609
609
|
/**
|
|
610
|
-
*
|
|
610
|
+
* 修改需求(使用 PUT /stories/:id 接口)
|
|
611
611
|
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
612
|
+
* 此方法使用标准的"修改需求其他字段"接口(PUT),支持修改29个字段
|
|
613
|
+
* 自动处理评审人问题,避免"该研发需求需要评审,评审人员不能为空"的错误
|
|
614
614
|
*
|
|
615
615
|
* @param storyId 需求ID
|
|
616
616
|
* @param update 需要更新的字段
|
|
@@ -618,7 +618,7 @@ export class ZentaoAPI {
|
|
|
618
618
|
*/
|
|
619
619
|
async changeStory(storyId, update) {
|
|
620
620
|
try {
|
|
621
|
-
console.log(
|
|
621
|
+
console.log(`正在更新需求 ${storyId}...`);
|
|
622
622
|
// 自动处理评审人问题
|
|
623
623
|
const updateData = { ...update };
|
|
624
624
|
// 如果用户没有设置评审人,也没有指定无需评审,则自动跳过评审
|
|
@@ -626,13 +626,13 @@ export class ZentaoAPI {
|
|
|
626
626
|
updateData.needNotReview = true;
|
|
627
627
|
console.log('自动设置needNotReview=true以跳过评审要求');
|
|
628
628
|
}
|
|
629
|
-
// 使用 PUT /stories/:id
|
|
629
|
+
// 使用 PUT /stories/:id 接口
|
|
630
630
|
const response = await this.request('PUT', `/stories/${storyId}`, undefined, updateData);
|
|
631
|
-
console.log('
|
|
631
|
+
console.log('更新需求响应:', response);
|
|
632
632
|
return response;
|
|
633
633
|
}
|
|
634
634
|
catch (error) {
|
|
635
|
-
console.error('
|
|
635
|
+
console.error('更新需求失败:', error);
|
|
636
636
|
throw error;
|
|
637
637
|
}
|
|
638
638
|
}
|
package/dist/index.js
CHANGED
|
@@ -581,10 +581,10 @@ server.tool("changeStory", {
|
|
|
581
581
|
comment: z.string().optional()
|
|
582
582
|
}),
|
|
583
583
|
z.string()
|
|
584
|
-
]).describe(
|
|
584
|
+
]).describe(`更新需求(使用 PUT 接口)
|
|
585
585
|
|
|
586
|
-
|
|
587
|
-
|
|
586
|
+
此工具使用标准的"修改需求其他字段"接口(PUT /stories/:id),支持修改29个字段。
|
|
587
|
+
自动处理评审人问题,无需手动设置 needNotReview。
|
|
588
588
|
|
|
589
589
|
支持对象或JSON字符串格式。
|
|
590
590
|
`.trim())
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zzp123/mcp-zentao",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.4",
|
|
4
4
|
"description": "禅道项目管理系统的高级API集成包,提供任务管理、Bug跟踪等功能的完整封装,专为Cursor IDE设计的MCP扩展",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
"test": "jest",
|
|
23
23
|
"test:watch": "jest --watch",
|
|
24
24
|
"test:manual": "ts-node test/manual-test.ts",
|
|
25
|
+
"test:story": "node quick-test-story.js",
|
|
26
|
+
"test:story:full": "node test-update-story.js",
|
|
25
27
|
"prepublishOnly": "npm run test && npm run build",
|
|
26
28
|
"start": "node json-args.js",
|
|
27
29
|
"upload:clipboard": "node scripts/upload-clipboard-image.js",
|