通过 Rest API 添加后,字段未显示在 WorkItem 上
field not displayed on WorkItem after adding through Rest API
我已经使用 Rest API 成功地将字段添加到流程中。
当我调用以下内容时
与以下Json
{
"defaultValue":空,
"referenceName": "my.test",
"name": "test",
"type": "string",
"readOnly":错误,
"required":错误,
"pickList":空,
"url":空,
"allowGroups": 空
}
它returns我下面的成功消息
{
"referenceName": "my.test",
"name": "test",
"type": "string",
"pickList":空,
"readOnly":错误,
"required":错误,
"defaultValue":空,
"url": "https://my.visualstudio.com/_apis/work/processDefinitions/a949f163-8d2c-4183-b26b-8f5b5385ef15/workItemTypes/my.ProductBacklogItem/fields/my.test",
"allowGroups": 空
}
但是在 VSTS 中,该字段未显示在 workItem 上
您刚刚将新字段添加到 PBI 工作项,但没有将该字段的控件引用添加到 PBI 工作项。
参考此请求将新控件添加到 PBI 工作项:
Put https://{account}.visualstudio.com/_apis/work/processDefinitions/{process template id}/workItemTypes/my.ProductBacklogItem/layout/groups/my.Product Backlog Item.Product Backlog Item.Details/Controls/my.test?api-version=4.1-preview
正文:application/json
{"order":null,"label":"testcontrol","readOnly":false,"visible":true,"controlType":null,"metadata":null,"inherited":null,"overridden":null,"watermark":null,"contribution":null,"height":null,"isContribution":false}
我已经使用 Rest API 成功地将字段添加到流程中。
当我调用以下内容时
与以下Json
{ "defaultValue":空, "referenceName": "my.test", "name": "test", "type": "string", "readOnly":错误, "required":错误, "pickList":空, "url":空, "allowGroups": 空 }
它returns我下面的成功消息
{ "referenceName": "my.test", "name": "test", "type": "string", "pickList":空, "readOnly":错误, "required":错误, "defaultValue":空, "url": "https://my.visualstudio.com/_apis/work/processDefinitions/a949f163-8d2c-4183-b26b-8f5b5385ef15/workItemTypes/my.ProductBacklogItem/fields/my.test", "allowGroups": 空 }
但是在 VSTS 中,该字段未显示在 workItem 上
您刚刚将新字段添加到 PBI 工作项,但没有将该字段的控件引用添加到 PBI 工作项。
参考此请求将新控件添加到 PBI 工作项:
Put https://{account}.visualstudio.com/_apis/work/processDefinitions/{process template id}/workItemTypes/my.ProductBacklogItem/layout/groups/my.Product Backlog Item.Product Backlog Item.Details/Controls/my.test?api-version=4.1-preview
正文:application/json
{"order":null,"label":"testcontrol","readOnly":false,"visible":true,"controlType":null,"metadata":null,"inherited":null,"overridden":null,"watermark":null,"contribution":null,"height":null,"isContribution":false}