2015-09-12 153 views
1

这个(解析描述)自定义字段应该在“解析”更改为“固定”时更新,因此我使用“过渡”REST API调用来完成它。我通过REST API调用传递了以下jason字符串。按预期工作的迹象。我不能用“转换”REST API调用来更改这两个字段吗?如何通过REST API更新JIRA中的自定义字段?

{"update": {"resolution description": [{ "add": { "body": "" + errors + "" }}]}, 
"transition": { "id": "5" }} 

“错误”是一个硬编码值的变量。

回答

3

我已经找到了这个问题的答案。我也把这个问题放在here。要使用REST API更新自定义字段,您可以基本上像这样写一个JSON字符串。有关更多信息,请参见this link,该网站明确包含了通过REST API访问JIRA自定义字段时需要了解的所有信息。

{ 
    "fields": { 
     "customfield_id": {"This is a shorthand for a set operation on a text custom field"}, 
     "resolution": {"name": "Fixed"} 
    }, 
    "transition": { 
     "id": "5" 
    } 
} 
相关问题