# 说明

返回缺陷所有字段及候选值(枚举值),即通常理解的字段的 "英文Key" 和 "中文值".

# url

https://api.tapd.cn/bugs/get_fields_info

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

GET

# 请求数限制

默认返回所有数据

# 请求参数

字段名 必选 类型及范围 说明 特殊规则
workspace_id integer 项目ID
all_options integer 是否也返回已关闭的选项。all_options=1 则返回。默认是 0,不返回,与TAPD界面对齐

# 调用示例及返回结果

# 获取项目下的缺陷字段

# curl 使用 Basic Auth 鉴权调用示例

curl -u 'api_user:api_password' 'https://api.tapd.cn/bugs/get_fields_info?workspace_id=10104801'

# 返回结果

{
    "status": 1,
    "data": {
        "id": {
            "name": "id",
            "label": "ID",
            "options": [],
            "html_type": "input",
            "memo": ""
        },
        "title": {
            "name": "title",
            "label": "标题",
            "options": [],
            "html_type": "input",
            "memo": ""
        },
        "description": {
            "name": "description",
            "label": "详细描述",
            "options": [],
            "html_type": "rich_edit",
            "memo": ""
        },
        "module": {
            "name": "module",
            "label": "模块",
            "options": {
                "222": "222",
                "创建模块": "创建模块"
            },
            "html_type": "select",
            "memo": ""
        },
        "feature": {
            "name": "feature",
            "label": "特性",
            "options": {
                "tx1": "tx1"
            },
            "html_type": "select",
            "memo": ""
        },
        "reporter": {
            "name": "reporter",
            "label": "创建人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "deadline": {
            "name": "deadline",
            "label": "解决期限",
            "options": [],
            "html_type": "dateinput",
            "memo": ""
        },
        "created": {
            "name": "created",
            "label": "创建时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "reopen_time": {
            "name": "reopen_time",
            "label": "重新打开时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "closed": {
            "name": "closed",
            "label": "关闭时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "modified": {
            "name": "modified",
            "label": "最后修改时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "lastmodify": {
            "name": "lastmodify",
            "label": "最后修改人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "de": {
            "name": "de",
            "label": "开发人员",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "te": {
            "name": "te",
            "label": "测试人员",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "auditer": {
            "name": "auditer",
            "label": "审核人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "confirmer": {
            "name": "confirmer",
            "label": "验证人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "current_owner": {
            "name": "current_owner",
            "label": "处理人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "status": {
            "name": "status",
            "label": "状态",
            "options": {
                "new": "新",
                "in_progress": "接受/处理",
                "assigned": "已分配",
                "resolved": "已解决",
                "verified": "已验证",
                "reopened": "重新打开",
                "rejected": "已拒绝",
                "closed": "已关闭"
            },
            "html_type": "select",
            "memo": ""
        },
        "resolution": {
            "name": "resolution",
            "label": "解决方法",
            "options": {
                "ignore": "无需解决",
                "fixed": "已修改",
                "fix later": "延期解决",
                "failed to recur": "无法重现",
                "external reason": "外部原因",
                "duplicated": "重复",
                "intentional design": "设计如此",
                "unclear description ": "问题描述不准确",
                "feature change": "需求变更",
                "transferred to story": "已转需求",
                "hold": "挂起"
            },
            "html_type": "select",
            "memo": ""
        },
        "priority": {
            "name": "priority",
            "label": "优先级",
            "options": {
                "urgent": "紧急",
                "high": "高",
                "medium": "中",
                "low": "低",
                "insignificant": "无关紧要"
            },
            "html_type": "select",
            "memo": ""
        },
        "severity": {
            "name": "severity",
            "label": "严重程度",
            "options": {
                "fatal": "致命",
                "serious": "严重",
                "normal": "一般",
                "prompt": "提示",
                "advice": "建议"
            },
            "html_type": "select",
            "memo": ""
        },
        "platform": {
            "name": "platform",
            "label": "软件平台",
            "options": {
                "PC": "PC",
                "其他": "其他"
            },
            "html_type": "select",
            "memo": ""
        },
        "os": {
            "name": "os",
            "label": "操作系统",
            "options": {
                "All": "All",
                "Windows XP": "Windows XP",
                "Windows 2000": "Windows 2000",
                "Windows NT": "Windows NT",
                "Linux": "Linux",
                "Unix": "Unix"
            },
            "html_type": "select",
            "memo": ""
        },
        "testmode": {
            "name": "testmode",
            "label": "测试方式",
            "options": {
                "手工测试": "手工测试",
                "自动化测试": "自动化测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "testtype": {
            "name": "testtype",
            "label": "测试类型",
            "options": {
                "功能测试": "功能测试",
                "性能测试": "性能测试",
                "界面测试": "界面测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "testphase": {
            "name": "testphase",
            "label": "测试阶段",
            "options": {
                "单元测试": "单元测试",
                "集成测试": "集成测试",
                "系统测试": "系统测试",
                "运营测试": "运营测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "source": {
            "name": "source",
            "label": "缺陷根源",
            "options": {
                "需求": "需求",
                "设计": "设计",
                "编码": "编码",
                "其它": "其它"
            },
            "html_type": "select",
            "memo": ""
        },
        "frequency": {
            "name": "frequency",
            "label": "重现规律",
            "options": {
                "可重现": "可重现",
                "随机重现": "随机重现",
                "不可重现": "不可重现"
            },
            "html_type": "select",
            "memo": ""
        },
        "cc": {
            "name": "cc",
            "label": "抄送人",
            "options": [],
            "html_type": "mix_chooser",
            "memo": ""
        },
        "fixer": {
            "name": "fixer",
            "label": "修复人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "closer": {
            "name": "closer",
            "label": "关闭人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "participator": {
            "name": "participator",
            "label": "参与人",
            "options": [],
            "html_type": "user_chooser",
            "memo": ""
        },
        "version_report": {
            "name": "version_report",
            "label": "发现版本",
            "options": {
                "测试": "测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "version_test": {
            "name": "version_test",
            "label": "验证版本",
            "options": {
                "测试": "测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "version_fix": {
            "name": "version_fix",
            "label": "合入版本",
            "options": {
                "测试": "测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "version_close": {
            "name": "version_close",
            "label": "关闭版本",
            "options": {
                "测试": "测试"
            },
            "html_type": "select",
            "memo": ""
        },
        "baseline_find": {
            "name": "baseline_find",
            "label": "发现基线",
            "options": {
                "test": "test"
            },
            "html_type": "select",
            "memo": ""
        },
        "baseline_join": {
            "name": "baseline_join",
            "label": "合入基线",
            "options": {
                "test": "test"
            },
            "html_type": "select",
            "memo": ""
        },
        "baseline_close": {
            "name": "baseline_close",
            "label": "关闭基线",
            "options": {
                "test": "test"
            },
            "html_type": "select",
            "memo": ""
        },
        "baseline_test": {
            "name": "baseline_test",
            "label": "验证基线 ",
            "options": {
                "test": "test"
            },
            "html_type": "select",
            "memo": ""
        },
        "originphase": {
            "name": "originphase",
            "label": "发现阶段",
            "options": {
                "需求阶段": "需求阶段",
                "架构阶段": "架构阶段",
                "设计阶段": "设计阶段",
                "编码阶段": "编码阶段",
                "测试阶段": "测试阶段",
                "上线阶段": "上线阶段"
            },
            "html_type": "select",
            "memo": ""
        },
        "sourcephase": {
            "name": "sourcephase",
            "label": "引入阶段  ",
            "options": {
                "需求阶段": "需求阶段",
                "架构阶段": "架构阶段",
                "设计阶段": "设计阶段",
                "编码阶段": "编码阶段",
                "测试阶段": "测试阶段",
                "集成阶段": "集成阶段"
            },
            "html_type": "select",
            "memo": ""
        },
        "bugtype": {
            "name": "bugtype",
            "label": "缺陷类型",
            "options": {
                "SQL注入": "SQL注入",
                "XSS": "XSS",
                "CSRF": "CSRF",
                "访问控制": "访问控制",
                "权限控制": "权限控制",
                "其它": "其它"
            },
            "html_type": "select",
            "memo": ""
        },
        "reject_time": {
            "name": "reject_time",
            "label": "拒绝时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "in_progress_time": {
            "name": "in_progress_time",
            "label": "接受处理时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "resolved": {
            "name": "resolved",
            "label": "解决时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "verify_time": {
            "name": "verify_time",
            "label": "验证时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "assigned_time": {
            "name": "assigned_time",
            "label": "分配时间",
            "options": [],
            "html_type": "datetime",
            "memo": ""
        },
        "iteration_id": {
            "name": "iteration_id",
            "label": "迭代",
            "options": {
                "1010104801001248517": "adra",
                "1010104801001179909": "aaaassssss",
                "1010104801001179887": "cjdd",
                "1010104801001171067": "oyctest20190911xxx1111",
                "1010104801001169803": "oyctest20190911xxx1111",
                "1010104801001123313": "oyctest20190911",
                "1010104801001123207": "oyctest20190911",
                "1010104801001112221": "myI",
                "1010104801001105965": "oyctest20190911xxx1111",
                "1010104801001105193": "oyctest20190911xxx1111",
                "1010104801001103985": "对对对",
                "1010104801001082081": "oyctest20190911",
                "1010104801001082017": "日常发布",
                "1010104801001082013": "日常发布",
                "1010104801001081899": "oyctest20190917ABC2",
                "1010104801001080913": "【Word】191001常规发布",
                "1010104801001080783": "日常发布",
                "1010104801000648821": "ssss",
                "1010104801000507691": "i2",
                "1010104801000507689": "i1",
                "1010104801000423181": "迭代1"
            },
            "html_type": "select",
            "memo": ""
        },
        "project_id": {
            "name": "project_id",
            "label": "所属项目",
            "options": {
                "10104801": "TAPD 乌云"
            },
            "html_type": "select",
            "memo": ""
        },
        "begin": {
            "name": "begin",
            "label": "预计开始",
            "options": [],
            "html_type": "dateinput",
            "memo": ""
        },
        "due": {
            "name": "due",
            "label": "预计结束",
            "options": [],
            "html_type": "dateinput",
            "memo": ""
        },
        "release_id": {
            "name": "release_id",
            "label": "发布计划",
            "options": {
                "1010104801000069739": "v2test",
                "1010104801000068721": "test",
                "1010104801000068405": "发布",
                "1010104801000058771": "4324"
            },
            "html_type": "select",
            "memo": ""
        },
        "estimate": {
            "name": "estimate",
            "label": "预计解决时间",
            "options": [],
            "html_type": "int",
            "memo": ""
        },
        "custom_field_one": {
            "name": "custom_field_one",
            "label": "测试下拉",
            "options": {
                "xxx": "xxx",
                "qqq": "qqq"
            },
            "html_type": "select",
            "memo": ""
        },
        "custom_field_two": {
            "name": "custom_field_two",
            "label": "测试字段",
            "options": [],
            "html_type": "text",
            "memo": ""
        }
    },
    "info": "success"
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536

# 返回格式说明

字段 说明
name name
options 候选值
html_type 类型
label 中文名称

# 返回候选值内容

缺陷字段 说明
priority 优先级
severity 严重程度
status 状态 枚举值 (可选值)
iteration_id 迭代 枚举值 (可选值)
module 模块 枚举值 (可选值)
release_id 发布计划 枚举值 (可选值)
version_report 发现版本 枚举值 (可选值)
version_test 验证版本 枚举值 (可选值)
version_fix 合入版本 枚举值 (可选值)
version_close 关闭版本 枚举值 (可选值)
baseline_find 发现基线 枚举值 (可选值)
baseline_join 合入基线 枚举值 (可选值)
baseline_test 验证基线 枚举值 (可选值)
baseline_close 关闭基线 枚举值 (可选值)
os 操作系统 枚举值 (可选值)
platform 软件平台 枚举值 (可选值)
testmode 测试方式 枚举值 (可选值)
testphase 测试阶段 枚举值 (可选值)
testtype 测试类型 枚举值 (可选值)
source 缺陷根源 枚举值 (可选值)
bugtype 缺陷类型 枚举值 (可选值)
frequency 重现规律 枚举值 (可选值)
originphase 发现阶段 枚举值 (可选值)
sourcephase 引入阶段 枚举值 (可选值)
resolution 解决方法 枚举值 (可选值)
custom_field_* 解决方法 枚举值 (可选值)

# 缺陷状态(status)可选值说明

status状态是支持每个项目单独配置的,所以状态(status)没有固定的中英文映射, 只能通过该接口获取.

# 缺陷优先级(priority)可选值说明

取值 字面值
urgent 紧急
high
medium
low
insignificant 无关紧要

# 缺陷严重程度(severity)可选值说明

取值 字面值
fatal 致命
serious 严重
normal 一般
prompt 提示
advice 建议

# 缺陷解决方法(resolution)可选值说明

取值 字面值
ignore 无需解决
fix 延期解决
failed 无法重现
external 外部原因
duplicated 重复
intentional 设计如此
unclear 问题描述不准确
hold 挂起
feature 需求变更
fixed 已解决
transferred to story 已转需求
上次更新: 2024-05-21 10:12:48