通过解决方案转换 Jira Issue
Transitioning Jira Issue with resolution
我想将 jira 问题转换为已完成并提出解决方案。
我正在使用 POST /rest/api/2/issue/{issueIdOrKey}/transitions REST 调用。
根据文档输入示例:
{
"update": {
"comment": [
{
"add": {
"body": "Bug has been fixed."
}
}
]
},
"fields": {
"assignee": {
"name": "bob"
},
"resolution": {
"name": "Fixed"
}
},
"transition": {
"id": "5"
},
"historyMetadata": {
"type": "myplugin:type",
"description": "text description",
"descriptionKey": "plugin.changereason.i18.key",
"activityDescription": "text description",
"activityDescriptionKey": "plugin.activity.i18.key",
"actor": {
"id": "tony",
"displayName": "Tony",
"type": "mysystem-user",
"avatarUrl": "http://mysystem/avatar/tony.jpg",
"url": "http://mysystem/users/tony"
},
"generator": {
"id": "mysystem-1",
"type": "mysystem-application"
},
"cause": {
"id": "myevent",
"type": "mysystem-event"
},
"extraData": {
"keyvalue": "extra data",
"goes": "here"
}
}
}
现在我只对字段转换和分辨率感兴趣。我的样本输入是:
{
"fields": {
"resolution": {
"name": "Done"
}
},
"transition": {
"id": "1"
}
}
我收到 400 错误消息:
{
"errorMessages": [],
"errors": {
"resolution": "Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown."
}
}
有人可以指出我遗漏了什么吗?
决议和状态是两个不同的东西。 完成 是一个(默认)状态,问题将根据您发送的转换 ID 转换到该状态。 Resolution 只是一个字符串,一个自定义字段,您可以在 Edit 屏幕中更改其值。根据错误,您没有在该项目中指定。
似乎与 ID 1 匹配的状态 "Done" 不应该在您的屏幕上接受您尝试设置的分辨率。
我想将 jira 问题转换为已完成并提出解决方案。
我正在使用 POST /rest/api/2/issue/{issueIdOrKey}/transitions REST 调用。
根据文档输入示例:
{
"update": {
"comment": [
{
"add": {
"body": "Bug has been fixed."
}
}
]
},
"fields": {
"assignee": {
"name": "bob"
},
"resolution": {
"name": "Fixed"
}
},
"transition": {
"id": "5"
},
"historyMetadata": {
"type": "myplugin:type",
"description": "text description",
"descriptionKey": "plugin.changereason.i18.key",
"activityDescription": "text description",
"activityDescriptionKey": "plugin.activity.i18.key",
"actor": {
"id": "tony",
"displayName": "Tony",
"type": "mysystem-user",
"avatarUrl": "http://mysystem/avatar/tony.jpg",
"url": "http://mysystem/users/tony"
},
"generator": {
"id": "mysystem-1",
"type": "mysystem-application"
},
"cause": {
"id": "myevent",
"type": "mysystem-event"
},
"extraData": {
"keyvalue": "extra data",
"goes": "here"
}
}
}
现在我只对字段转换和分辨率感兴趣。我的样本输入是:
{
"fields": {
"resolution": {
"name": "Done"
}
},
"transition": {
"id": "1"
}
}
我收到 400 错误消息:
{
"errorMessages": [],
"errors": {
"resolution": "Field 'resolution' cannot be set. It is not on the appropriate screen, or unknown."
}
}
有人可以指出我遗漏了什么吗?
决议和状态是两个不同的东西。 完成 是一个(默认)状态,问题将根据您发送的转换 ID 转换到该状态。 Resolution 只是一个字符串,一个自定义字段,您可以在 Edit 屏幕中更改其值。根据错误,您没有在该项目中指定。
似乎与 ID 1 匹配的状态 "Done" 不应该在您的屏幕上接受您尝试设置的分辨率。