# 说明
获取工作流流转细则
# url
https://api.tapd.cn/workflows/all_transitions
# 支持格式
JSON/XML(默认JSON格式)
# HTTP请求方式
GET
# 请求数限制
一次只能获取一个项目的工作流流转细则
# 请求参数
字段名 | 必选 | 类型及范围 | 说明 | 特殊规则 |
---|---|---|---|---|
workspace_id | 是 | integer | 项目ID | |
system | 是 | string | 系统名。取 bug (缺陷的)或者 story(需求的) | |
workitem_type_id | 否 | integer | 需求类别 |
# 调用示例及返回结果
# 获取项目缺陷工作流
# curl 使用 Basic Auth 鉴权调用示例
curl -u 'api_user:api_password' 'https://api.tapd.cn/workflows/all_transitions?system=bug&workspace_id=10104801'
# 返回结果
{
"status": 1,
"data": {
"Name": "start-new",
"StepPrevious": "start",
"StepNext": "new",
"Appendfield": [
{
"DBModel": "Bug",
"FieldName": "BugStoryRelation_relative_id",
"Notnull": "yes",
"Sort": "2"
},
{
"DBModel": "Bug",
"FieldName": "begin",
"Notnull": "yes",
"Sort": "3"
},
{
"DBModel": "Bug",
"FieldName": "due",
"Notnull": "yes",
"Sort": "4"
},
{
"DBModel": "Bug",
"FieldName": "current_owner",
"Notnull": "yes",
"Sort": "1"
},
{
"DBModel": "Bug",
"FieldName": "module",
"Notnull": "yes",
"Sort": "8"
},
{
"DBModel": "Bug",
"FieldName": "priority",
"Notnull": "yes",
"Sort": "10"
},
{
"DBModel": "Bug",
"FieldName": "severity",
"Notnull": "yes",
"Sort": "11"
},
{
"DBModel": "Bug",
"FieldName": "version_report",
"Notnull": "yes",
"Sort": "12"
}
]
},
{
"Name": "new-new",
"StepPrevious": "new",
"StepNext": "new",
"Inform": [
{
"InformType": "RTX",
"InformId": "1716"
},
{
"InformType": "Email",
"InformId": "1717"
}
],
"Appendfield": [
{
"DBModel": "Bug",
"FieldName": "remarks",
"Notnull": "yes",
"Sort": "1",
"DefaultValue": [
{
"Type": "default_value",
"Value": ""
}
]
},
{
"DBModel": "Bug",
"FieldName": "current_owner",
"Notnull": "yes",
"Sort": "2",
"DefaultValue": [
{
"Type": "record_value",
"DBModel": "Bug",
"Field": "current_owner"
}
]
}
]
},
{
"Name": "new-in_progress",
"StepPrevious": "new",
"StepNext": "in_progress",
"Inform": [
{
"InformType": "RTX",
"InformId": "1703"
},
{
"InformType": "Email",
"InformId": "1715"
}
],
"Appendfield": [
{
"DBModel": "Bug",
"FieldName": "remarks",
"Notnull": "no",
"Sort": "1",
"DefaultValue": [
{
"Type": "default_value",
"Value": ""
}
]
},
{
"DBModel": "Bug",
"FieldName": "current_owner",
"Notnull": "yes",
"Sort": "2",
"DefaultValue": [
{
"Type": "record_value",
"DBModel": "Bug",
"Field": "current_owner"
}
]
},
{
"DBModel": "Bug",
"FieldName": "de",
"Notnull": "yes",
"Sort": "3",
"DefaultValue": [
{
"Type": "record_value",
"DBModel": "Bug",
"Field": "current_owner"
}
]
},
{
"DBModel": "Bug",
"FieldName": "auditer",
"Notnull": "yes",
"Sort": "4",
"DefaultValue": [
{
"Type": "record_value",
"DBModel": "Bug",
"Field": "reporter"
}
]
}
]
},
"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
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
# 返回字段说明
字段 | 说明 |
---|---|
Name | 状态(步骤)流转名称 |
StepPrevious | 当前状态(步骤) |
StepNext | 目标状态(步骤) |
appendfield | 状态(步骤)流转时需要补充的附加字段 |
authorized_user | 状态(步骤)流转权限设置 |
# appendfield字段说明
字段 | 说明 |
---|---|
FieldName | 字段名称,用于系统后台保存 |
Notnull | 是否必填 |
Sort | 显示排序号 |
default_value | 默认值设置 |
# default_value字段说明
字段 | 说明 |
---|---|
Type | 默认值类型 |
Field | 对应系统字段 |