[英]Azure DevOps Create Work Item Rest API doesn't support custom fields?
I'm using the documentation here: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/create?view=azure-devops-rest-6.0#operation我在这里使用文档: https://docs.microsoft.com/en-us/rest/api/azure/devops/wit/work%20items/create?view=azure-devops-rest-6.0#operation
and seem to be unable to pass data to a fields object.并且似乎无法将数据传递到字段 object。
In my Azure DevOps, I have a custom field on my work items (Epics, tasks, etc.) called SSFKID.在我的 Azure DevOps 中,我的工作项(史诗、任务等)上有一个名为 SSFKID 的自定义字段。
Using Postman, I'm sending the following to the API endpoint.使用 Postman,我将以下内容发送到 API 端点。
[
{
"op": "add",
"path": "/fields/System.Title",
"from": null,
"value": "Sample task 3",
fields: [
{"System.SSFKID" : 12345}
]
}
]
I am getting 200 responses, however, when I go to ADO UI and check the work item, the SSFKID field is not populated, so there is probably something wrong with my syntax.我收到 200 条回复,但是,当我 go 到 ADO UI 并检查工作项时,未填充 SSFKID 字段,因此我的语法可能有问题。 I'm not finding any documentation on how to do this.
我没有找到任何有关如何执行此操作的文档。 Any assistance?
有什么帮助吗?
I think you should use this:我认为你应该使用这个:
new
{
"op" = "add",
"path" = "/fields/Custom.SSFKID",
"from": null,
"value" = "12345"
},
You should not add this wrong path.您不应添加此错误路径。 You should remove it:
你应该删除它:
fields: [
{"System.SSFKID" : 12345}
]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.