您好我正在尝试使用TFS中的REST API批处理操作重新打开(关闭新状态)错误。
我的补丁文件如下
[
{
"method":"PATCH","uri":"/_apis/wit/workItems/309?api-version=1.0","headers":{
"Content-Type":"application/json-patch+json"
},
"body":
[
{
"op":"add",
"path":"/fields/System.State",
"value":"New"
},
{
"from":"add",
"op":"add",
"path":"/fields/System.Tags",
"value":"abc,cde,efg"
}
]
}
]
我收到以下错误,我发现文件中没有太多信息请帮助我纠正这个问题。
TF401320: Rule Error for field Resolved Reason. Error code: HasValues, LimitedToValues, SetByRule, InvalidNotEmpty.
p.s:类似方法可以正常修改“新”错误“关闭”
答案 0 :(得分:1)
您需要清除ResolvedReason字段值:
[
{
"op":"add",
"path":"/fields/System.State",
"value":"New"
},
{
"op":"add",
"path":"/fields/Microsoft.VSTS.Common.ResolvedReason",
"value":""
}
]