@bangdao-ai/zentao-mcp 1.1.2 → 1.1.3

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/README.md CHANGED
@@ -139,11 +139,12 @@ pip3 install -r requirements.txt
139
139
  "@bangdao-ai/zentao-mcp@latest"
140
140
  ],
141
141
  "env": {
142
- "ZENTAO_PRODUCT_ID": "365",
143
- "ZENTAO_OPENED_BY": "69610",
144
- "KEY": "643f0f490d1ea0d47520dd270989c99a",
142
+ "ZENTAO_PRODUCT_ID": "your-product-id",
143
+ "ZENTAO_OPENED_BY": "your-user-id",
144
+ "KEY": "your-api-key",
145
145
  "ZENTAO_KEYWORDS": "AI",
146
- "ZENTAO_TITLE_PREFIX": ""
146
+ "ZENTAO_TITLE_PREFIX": "",
147
+ "ZENTAO_ROLE_TYPE": "test"
147
148
  }
148
149
  }
149
150
  }
@@ -156,6 +157,7 @@ pip3 install -r requirements.txt
156
157
  - `KEY`(必需):API认证密钥,作为API认证的key参数
157
158
  - `ZENTAO_KEYWORDS`(可选):关键词,默认为空
158
159
  - `ZENTAO_TITLE_PREFIX`(可选):标题前缀,默认为空
160
+ - `ZENTAO_ROLE_TYPE`(可选):角色类型,默认为"test"
159
161
 
160
162
  ### 兜底配置(可选)
161
163
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bangdao-ai/zentao-mcp",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "禅道Bug管理系统MCP工具",
5
5
  "main": "index.js",
6
6
  "bin": {
@@ -30,5 +30,8 @@
30
30
  "repository": {
31
31
  "type": "git",
32
32
  "url": "git+https://github.com/bangdao-ai/zentao-mcp.git"
33
+ },
34
+ "publishConfig": {
35
+ "access": "public"
33
36
  }
34
37
  }
@@ -681,13 +681,19 @@ class ZenTaoNexus:
681
681
  LOWER_BUG = "0"
682
682
  REGRESSION = "0"
683
683
 
684
- # 职位类型到任务类型的映射
684
+ # 职位类型到任务类型的映射(支持中英文)
685
685
  ROLE_TO_TASK_TYPE = {
686
+ # 中文
686
687
  "测试": "4", # 测试
687
688
  "前端": "8", # 前端开发
688
689
  "后端": "3", # 后端开发
689
690
  "其它": "20", # 其他
690
- "其他": "20" # 其他(兼容两种写法)
691
+ "其他": "20", # 其他(兼容两种写法)
692
+ # 英文
693
+ "test": "4", # 测试
694
+ "frontend": "8", # 前端开发
695
+ "backend": "3", # 后端开发
696
+ "other": "20" # 其他
691
697
  }
692
698
 
693
699
  def __init__(self, config_path: str = None):
@@ -887,8 +893,9 @@ class ZenTaoNexus:
887
893
  """
888
894
  # 如果 task_data 中没有指定 mold,且配置了职位类型,则自动设置
889
895
  if 'mold' not in task_data or (task_data.get('mold') == '' or task_data.get('mold') is None):
890
- if self.role_type and self.role_type in self.ROLE_TO_TASK_TYPE:
891
- task_data['mold'] = self.ROLE_TO_TASK_TYPE[self.role_type]
896
+ if self.role_type:
897
+ # 如果映射存在,使用映射值;否则使用"其它"对应的值 "20"
898
+ task_data['mold'] = self.ROLE_TO_TASK_TYPE.get(self.role_type, "20")
892
899
 
893
900
  # 自动设置预计开始时间(当前日期)
894
901
  if 'estStarted' not in task_data or (task_data.get('estStarted') == '' or task_data.get('estStarted') is None):