@zzp123/mcp-zentao 1.18.0 → 1.18.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.
@@ -33,17 +33,16 @@ export declare class ZentaoAPI {
33
33
  */
34
34
  private filterBugFields;
35
35
  /**
36
- * 获取我的 Bug 列表(固定查询指派给我的 Bug
36
+ * 获取我的 Bug 列表(固定查询指派给我的 Bug,固定每页20条)
37
37
  *
38
38
  * @param productId 产品ID(可选,默认使用第二个产品)
39
39
  * @param page 页码(从1开始,默认1)
40
- * @param limit 每页数量(默认20,最大100)
41
40
  * @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
42
41
  * @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
43
42
  * @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
44
43
  * @returns Promise<Bug列表及分页信息>
45
44
  */
46
- getMyBugs(productId?: number, page?: number, limit?: number, branch?: string, order?: string, fields?: 'basic' | 'default' | 'full'): Promise<{
45
+ getMyBugs(productId?: number, page?: number, branch?: string, order?: string, fields?: 'basic' | 'default' | 'full'): Promise<{
47
46
  page: number;
48
47
  total: number;
49
48
  limit: number;
@@ -197,15 +197,18 @@ export class ZentaoAPI {
197
197
  }
198
198
  if (fields === 'basic') {
199
199
  // 基本信息:只返回最核心的字段
200
+ // 注意:移除了 assignedTo(因为 getMyBugs 固定查询指派给我的 Bug,该字段无信息价值)
201
+ // 新增:statusName(中文状态名)、deadline(截止日期)
200
202
  return {
201
203
  id: bug.id,
202
204
  title: bug.title,
203
205
  status: bug.status,
206
+ statusName: bug.statusName,
204
207
  pri: bug.pri,
205
208
  severity: bug.severity,
206
- assignedTo: bug.assignedTo,
207
209
  openedBy: bug.openedBy,
208
- openedDate: bug.openedDate
210
+ openedDate: bug.openedDate,
211
+ deadline: bug.deadline
209
212
  };
210
213
  }
211
214
  // default: 默认字段(适合列表展示)
@@ -232,17 +235,16 @@ export class ZentaoAPI {
232
235
  };
233
236
  }
234
237
  /**
235
- * 获取我的 Bug 列表(固定查询指派给我的 Bug
238
+ * 获取我的 Bug 列表(固定查询指派给我的 Bug,固定每页20条)
236
239
  *
237
240
  * @param productId 产品ID(可选,默认使用第二个产品)
238
241
  * @param page 页码(从1开始,默认1)
239
- * @param limit 每页数量(默认20,最大100)
240
242
  * @param branch 分支筛选('all'所有分支/'0'主干/分支ID,默认'all')
241
243
  * @param order 排序字段(如:'id_desc'、'pri_desc'等,默认'id_desc')
242
244
  * @param fields 返回字段级别('basic'基本/'default'默认/'full'完整,默认'basic')
243
245
  * @returns Promise<Bug列表及分页信息>
244
246
  */
245
- async getMyBugs(productId, page, limit, branch, order, fields) {
247
+ async getMyBugs(productId, page, branch, order, fields) {
246
248
  if (!productId) {
247
249
  // 如果没有提供产品ID,获取第二个可用的产品(索引为1)
248
250
  const products = await this.getProducts();
@@ -253,8 +255,8 @@ export class ZentaoAPI {
253
255
  productId = products.length > 1 ? products[1].id : products[0].id;
254
256
  console.log(`使用产品ID: ${productId} (${products.length > 1 ? '第二个' : '第一个'})`);
255
257
  }
256
- // 默认每页20条,最多100
257
- const finalLimit = limit ? Math.min(limit, 100) : 20;
258
+ // 固定每页20条
259
+ const finalLimit = 20;
258
260
  const finalPage = page || 1;
259
261
  const finalBranch = branch || 'all';
260
262
  const finalOrder = order || 'id_desc';
package/dist/index-dev.js CHANGED
@@ -75,17 +75,16 @@ server.tool("getTaskDetail", {
75
75
  content: [{ type: "text", text: JSON.stringify(task, null, 2) }]
76
76
  };
77
77
  });
78
- server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'", {
78
+ server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'),固定每页20条", {
79
79
  productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
80
80
  page: z.number().optional().describe("页码,从1开始,默认为1"),
81
- limit: z.number().optional().describe("每页数量,默认20,最大100"),
82
81
  branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
83
82
  order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
84
83
  fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
85
- }, async ({ productId, page, limit, branch, order, fields }) => {
84
+ }, async ({ productId, page, branch, order, fields }) => {
86
85
  if (!zentaoApi)
87
86
  throw new Error("Please initialize Zentao API first");
88
- const result = await zentaoApi.getMyBugs(productId, page, limit, branch, order, fields);
87
+ const result = await zentaoApi.getMyBugs(productId, page, branch, order, fields);
89
88
  // 返回分页信息和数据
90
89
  const summary = {
91
90
  summary: `当前第 ${result.page} 页,共 ${result.total} 个Bug,本页显示 ${result.bugs.length} 个`,
package/dist/index-pm.js CHANGED
@@ -85,17 +85,16 @@ server.tool("getProducts", "获取产品列表 - 只返回核心字段(id, 名
85
85
  content: [{ type: "text", text: JSON.stringify(products, null, 2) }]
86
86
  };
87
87
  });
88
- server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'", {
88
+ server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'),固定每页20条", {
89
89
  productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
90
90
  page: z.number().optional().describe("页码,从1开始,默认为1"),
91
- limit: z.number().optional().describe("每页数量,默认20,最大100"),
92
91
  branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
93
92
  order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
94
93
  fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
95
- }, async ({ productId, page, limit, branch, order, fields }) => {
94
+ }, async ({ productId, page, branch, order, fields }) => {
96
95
  if (!zentaoApi)
97
96
  throw new Error("Please initialize Zentao API first");
98
- const result = await zentaoApi.getMyBugs(productId, page, limit, branch, order, fields);
97
+ const result = await zentaoApi.getMyBugs(productId, page, branch, order, fields);
99
98
  // 返回分页信息和数据
100
99
  const summary = {
101
100
  summary: `当前第 ${result.page} 页,共 ${result.total} 个Bug,本页显示 ${result.bugs.length} 个`,
package/dist/index-qa.js CHANGED
@@ -75,17 +75,16 @@ server.tool("getTaskDetail", {
75
75
  content: [{ type: "text", text: JSON.stringify(task, null, 2) }]
76
76
  };
77
77
  });
78
- server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'", {
78
+ server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'),固定每页20条", {
79
79
  productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
80
80
  page: z.number().optional().describe("页码,从1开始,默认为1"),
81
- limit: z.number().optional().describe("每页数量,默认20,最大100"),
82
81
  branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
83
82
  order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
84
83
  fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
85
- }, async ({ productId, page, limit, branch, order, fields }) => {
84
+ }, async ({ productId, page, branch, order, fields }) => {
86
85
  if (!zentaoApi)
87
86
  throw new Error("Please initialize Zentao API first");
88
- const result = await zentaoApi.getMyBugs(productId, page, limit, branch, order, fields);
87
+ const result = await zentaoApi.getMyBugs(productId, page, branch, order, fields);
89
88
  // 返回分页信息和数据
90
89
  const summary = {
91
90
  summary: `当前第 ${result.page} 页,共 ${result.total} 个Bug,本页显示 ${result.bugs.length} 个`,
package/dist/index.js CHANGED
@@ -89,17 +89,16 @@ server.tool("getProducts", "获取产品列表 - 只返回核心字段(id, 名
89
89
  };
90
90
  });
91
91
  // Add getMyBugs tool
92
- server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'", {
92
+ server.tool("getMyBugs", "获取我的Bug列表 - 固定查询指派给我的Bug(status='assigntome'),固定每页20条", {
93
93
  productId: z.number().optional().describe("产品ID,默认使用第二个产品"),
94
94
  page: z.number().optional().describe("页码,从1开始,默认为1"),
95
- limit: z.number().optional().describe("每页数量,默认20,最大100"),
96
95
  branch: z.string().optional().describe("分支筛选:'all'(所有分支,默认)、'0'(主干分支)、分支ID"),
97
96
  order: z.string().optional().describe("排序方式,如 id_desc(ID降序), pri_desc(优先级降序), openedDate_desc(创建时间降序)等,默认id_desc"),
98
97
  fields: z.enum(['basic', 'default', 'full']).optional().describe("返回字段级别:'basic'(基本字段,默认)、'default'(默认字段)、'full'(完整字段),默认'basic'")
99
- }, async ({ productId, page, limit, branch, order, fields }) => {
98
+ }, async ({ productId, page, branch, order, fields }) => {
100
99
  if (!zentaoApi)
101
100
  throw new Error("Please initialize Zentao API first");
102
- const result = await zentaoApi.getMyBugs(productId, page, limit, branch, order, fields);
101
+ const result = await zentaoApi.getMyBugs(productId, page, branch, order, fields);
103
102
  // 返回分页信息和数据
104
103
  const summary = {
105
104
  summary: `当前第 ${result.page} 页,共 ${result.total} 个Bug,本页显示 ${result.bugs.length} 个`,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zzp123/mcp-zentao",
3
- "version": "1.18.0",
3
+ "version": "1.18.2",
4
4
  "description": "禅道项目管理系统的高级API集成包 - 完整版,包含所有94个工具。另有产品经理、测试工程师、开发工程师专用精简版本可选",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",