# 说明

用于更新缺陷的字段 或者 流转缺陷状态,返回缺陷更新后的数据

# url

https://api.tapd.cn/bugs

# 支持格式

JSON/XML(默认JSON格式)

# HTTP请求方式

POST

# 请求数限制

每次只允许更新一条数据

# 请求参数

字段名 必选 类型及范围 说明
id integer ID
workspace_id integer 项目ID
title string 标题
priority string 优先级。为了兼容自定义优先级,请使用 priority_label 字段,详情参考:如何兼容自定义优先级
priority_label string 优先级。推荐使用这个字段
severity string 严重程度
status string 状态
v_status string 状态(支持传入中文状态名称)
module string 模块
release_id integer 发布计划
version_report string 发现版本
version_test string 验证版本
version_fix string 合入版本
version_close string 关闭版本
baseline_find string 发现基线
baseline_join string 合入基线
baseline_test string 验证基线
baseline_close string 关闭基线
current_owner string 处理人
cc string 抄送人
reporter string 创建人
current_user string 变更人
participator string 参与人
te string 测试人员
de string 开发人员
auditer string 审核人
confirmer string 验证人
fixer string 修复人
closer string 关闭人
lastmodify string 最后修改人
in_progress_time datetime 接受处理时间
verify_time datetime 验证时间
reject_time datetime 拒绝时间
begin date 预计开始
due date 预计结束
deadline date 解决期限
os string 操作系统
platform string 软件平台
testmode string 测试方式
testphase string 测试阶段
testtype string 测试类型
source string 缺陷根源
bugtype string 缺陷类型
frequency string 重现规律
originphase string 发现阶段
sourcephase string 引入阶段
resolution string 解决方法
estimate integer 预计解决时间
description string 详细描述
label string 标签,标签不存在时将自动创建,多个以英文坚线分格
effort integer 预估工时
keep_owner integer 是否保存处理人。取 1 则是保留
cus_{$自定义字段别名} string 自定义字段值,参数名会由后台自动转义为custom_field_*,如:cus_自定义字段的名称
custom_field_* string或者integer 自定义字段参数,具体字段名通过接口 获取缺陷自定义字段配置 获取
custom_plan_field_* string或者integer 自定义计划应用参数,具体字段名通过接口 获取自定义计划应用 获取

# 调用示例及返回结果

# 更新缺陷 1010158231500628817 的当前处理人给 anyechen

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

curl -u 'api_user:api_password' -d 'current_owner=anyechen;&id=1010158231500628817&workspace_id=10158231' 'https://api.tapd.cn/bugs'

# 返回结果

{
    "status": 1,
    "data": {
        "Bug": {
            "id": "1010158231500628817",
            "title": "【示例】新官网Chrome浏览器兼容性bug",
            "description": null,
            "priority": "high",
            "severity": "prompt",
            "module": null,
            "status": "in_progress",
            "reporter": "anyechen",
            "deadline": null,
            "created": "2017-06-20 16:49:19",
            "bugtype": "",
            "resolved": null,
            "closed": null,
            "modified": "2019-06-27 14:29:03",
            "lastmodify": "anyechen",
            "auditer": null,
            "de": null,
            "fixer": null,
            "version_test": "",
            "version_report": "版本1",
            "version_close": "",
            "version_fix": "",
            "baseline_find": "",
            "baseline_join": "",
            "baseline_close": "",
            "baseline_test": "",
            "sourcephase": "",
            "te": null,
            "current_owner": "anyechen;",
            "iteration_id": "0",
            "resolution": "",
            "source": "",
            "originphase": "",
            "confirmer": null,
            "milestone": null,
            "participator": null,
            "closer": null,
            "platform": "",
            "os": "",
            "testtype": "",
            "testphase": "",
            "frequency": "",
            "cc": null,
            "regression_number": "0",
            "flows": "new",
            "feature": null,
            "testmode": "",
            "estimate": null,
            "issue_id": null,
            "created_from": null,
            "in_progress_time": null,
            "verify_time": null,
            "reject_time": null,
            "reopen_time": null,
            "audit_time": null,
            "suspend_time": null,
            "due": null,
            "begin": null,
            "release_id": null,
            "label": "阻塞|延期",
            "cus_自定义字段的名称": "custom_field_value",
            "custom_field_one": "",
            "custom_field_two": "",
            "custom_field_three": "",
            "custom_field_four": "",
            "custom_field_five": "",
            "custom_field_6": "",
            "custom_field_7": "",
            "custom_field_8": "",
            "custom_field_9": "",
            "custom_field_10": "",
            "custom_field_11": "",
            "custom_field_12": "",
            "custom_field_13": "",
            "custom_field_14": "",
            "custom_field_15": "",
            "custom_field_16": "",
            "custom_field_17": "",
            "custom_field_18": "",
            "custom_field_19": "",
            "custom_field_20": "",
            "custom_field_21": "",
            "custom_field_22": "",
            "custom_field_23": "",
            "custom_field_24": "",
            "custom_field_25": "",
            "custom_field_26": "",
            "custom_field_27": "",
            "custom_field_28": "",
            "custom_field_29": "",
            "custom_field_30": "",
            "custom_field_31": "",
            "custom_field_32": "",
            "custom_field_33": "",
            "custom_field_34": "",
            "custom_field_35": "",
            "custom_field_36": "",
            "custom_field_37": "",
            "custom_field_38": "",
            "custom_field_39": "",
            "custom_field_40": "",
            "custom_field_41": "",
            "custom_field_42": "",
            "custom_field_43": "",
            "custom_field_44": "",
            "custom_field_45": "",
            "custom_field_46": "",
            "custom_field_47": "",
            "custom_field_48": "",
            "custom_field_49": "",
            "custom_field_50": "",
            "workspace_id": "10158231"
        }
    },
    "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

# 缺陷字段说明

缺陷字段说明,请参考 缺陷说明

上次更新: 2024-06-20 15:36:47