这就是在 ESB 连接器中更新问题的方式。所以检查 issueIdOrKey 是否正确并检查 issueFields 的格式,它也将是 JSON 字符串。
<jira.updateIssue>
<issueIdOrKey>ESBJAVA-2095</issueIdOrKey>
<issueFields>{$ctx:issueFields}</issueFields>
</jira.updateIssue>
要更新问题,请使用 jira.updateIssue,指定问题 ID,并将问题的 JSON 表示作为负载附加到请求中。您使用与创建问题时类似的方法,但是当您做的不仅仅是设置新字段时,请使用更新参数而不是字段。例如,如果您想更改描述并添加和删除标签,您可以使用更新参数,如下所示:
{
"update": {
"description": [
{
"set": "We need to update the license agreement file before shipping the 2.0 release. Please get from John Smith in the legal department."
}
],
"labels": [
{
"add": "triaged"
},
{
"remove": "blocker"
}
]
}
}
如果只需要设置字段的值,可以使用fields参数代替,相当于使用set和update参数。有关使用 fields 参数的示例,请参阅创建问题。
您可以设置显式字段值或使用操作来更改字段值。可以在 fields 参数或 update 参数中更新的字段可以使用 /rest/api/2/issue/{issueIdOrKey}/editmeta 资源来确定。如果某个字段没有配置为出现在编辑屏幕上,它就不会出现在editmeta中,如果提交了就会出现字段验证错误。
属性
issueIdOrKey: Identifies the issue to update. This can be an issue ID, or an issue key. If the issue cannot be found via an exact match, JIRA will also look for the issue in a case-insensitive way, or by looking to see if the issue was moved.
相关的 JIRA API
https://developer.atlassian.com/static/rest/jira/6.1.html#d2e1209