Controls - Set Control In Group
将控件移动到新组
PUT https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}?api-version=4.1-preview.1
PUT https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}?removeFromGroupId={removeFromGroupId}&api-version=4.1-preview.1
URI 参数
名称 | 在 | 必需 | 类型 | 说明 |
---|---|---|---|---|
control
|
path | True |
string |
控件的 ID |
group
|
path | True |
string |
要将控件移动到的组的 ID |
organization
|
path | True |
string |
Azure DevOps 组织的名称。 |
process
|
path | True |
string uuid |
进程的 ID |
wit
|
path | True |
string |
工作项类型的引用名称 |
api-version
|
query | True |
string |
要使用的 API 版本。 应将其设置为“4.1-preview.1”才能使用此版本的 API。 |
remove
|
query |
string |
要从中删除控件的组 |
请求正文
名称 | 类型 | 说明 |
---|---|---|
contribution |
控件的贡献。 |
|
controlType |
string |
控件的类型。 |
height |
integer |
控件的高度,对于 html 控件。 |
id |
string |
布局节点的 ID。 |
inherited |
boolean |
一个 值,该值指示此布局节点是否继承自父布局。 这只能由组合器设置。 |
isContribution |
boolean |
一个值,该值指示布局节点是否为贡献节点。 |
label |
string |
字段的标签 |
metadata |
string |
控件的内部文本。 |
order |
integer |
|
overridden |
boolean |
一个 值,该值指示此布局节点是否已被子布局覆盖。 |
readOnly |
boolean |
一个值,该值指示控件是否为只读。 |
visible |
boolean |
一个值,该值指示控件是否应隐藏。 |
watermark |
string |
文本框的水印文本。 |
响应
名称 | 类型 | 说明 |
---|---|---|
200 OK |
成功的操作 |
安全性
accessToken
个人访问令牌。 将任何值用作用户名和令牌作为密码。
类型:
basic
示例
Move a control to a new group
示例请求
PUT https://dev.azure.com/{organization}/_apis/work/processdefinitions/{processId}/workItemTypes/{witRefName}/layout/groups/{groupId}/controls/{controlId}?api-version=4.1-preview.1
{
"label": "",
"readonly": false,
"id": "c1681eea-cf9e-4a32-aee9-83e97fde894a",
"isContribution": true,
"visible": true,
"contribution": {
"contributionId": "ms-devlabs.toggle-control.toggle-control-contribution",
"inputs": {
"FieldName": "System.BoardColumnDone",
"TrueLabel": "new value"
}
},
"order": 0
}
示例响应
{
"id": "c1681eea-cf9e-4a32-aee9-83e97fde894a",
"label": "",
"readOnly": false,
"visible": true,
"contribution": {
"contributionId": "ms-devlabs.toggle-control.toggle-control-contribution",
"inputs": {
"FieldName": "System.BoardColumnDone",
"TrueLabel": "new value"
}
},
"isContribution": true
}
定义
名称 | 说明 |
---|---|
Control |
表示窗体中的控件。 |
Wit |
Control
表示窗体中的控件。
名称 | 类型 | 说明 |
---|---|---|
contribution |
控件的贡献。 |
|
controlType |
string |
控件的类型。 |
height |
integer |
控件的高度,对于 html 控件。 |
id |
string |
布局节点的 ID。 |
inherited |
boolean |
一个 值,该值指示此布局节点是否继承自父布局。 这只能由组合器设置。 |
isContribution |
boolean |
一个值,该值指示布局节点是否为贡献节点。 |
label |
string |
字段的标签 |
metadata |
string |
控件的内部文本。 |
order |
integer |
|
overridden |
boolean |
一个 值,该值指示此布局节点是否已被子布局覆盖。 |
readOnly |
boolean |
一个值,该值指示控件是否为只读。 |
visible |
boolean |
一个值,该值指示控件是否应隐藏。 |
watermark |
string |
文本框的水印文本。 |
WitContribution
名称 | 类型 | 说明 |
---|---|---|
contributionId |
string |
贡献的 ID。 |
height |
integer |
贡献的高度。 |
inputs |
object |
保存贡献输入的键值对的字典。 |
showOnDeletedWorkItem |
boolean |
一个值,该值指示是否应在已删除的 workItem 上显示贡献。 |