我正在尝试将问题从一种状态转换为另一种状态。
当我打电话
jira.statuses()
我会得到一份状态列表,其中包括我想转换为的状态:
<JIRA Status: name=u'Scheduled', id=u'11301'>
当我对https://our.server/rest/api/2/issue/issue_id/transitions进行ping操作时,会收到以下响应:
{
"expand": "transitions",
"transitions": [
{
"id": "51",
"name": "Close Request",
"to": {
"self": "https://our.server/rest/api/2/status/6",
"description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.",
"iconUrl": "https://our.server/images/icons/statuses/closed.png",
"name": "Closed",
"id": "6",
"statusCategory": {
"self": "https://our.server/rest/api/2/statuscategory/3",
"id": 3,
"key": "done",
"colorName": "green",
"name": "Done"
}
}
}
]
}
这里的问题是,当我尝试转换为“已计划”状态或ID为“ 11301”时,出现以下错误:
response text = {"errorMessages":["Internal server error"],"errors":{}}
我是否需要将此状态添加到转换中?还是我需要在过渡中包含更多数据?我不太确定该如何诊断。
答案 0 :(得分:0)
您只能将其更改为从当前状态过渡到所需状态的状态。如果您的工作流程必须严格遵循“待办事项”->“进行中”->“已解决”->“已关闭”,并且当前票证位于“待办事项”中,并且您希望将其设为“已关闭”,则您必须经历每个状态才能到达那里,并且如果您沿途需要字段,则也必须传递这些字段,例如,从未解决状态变为已解决状态通常需要解决。除此之外,您不应受到限制(除非您在过渡的条件/验证器中内置了某种其他逻辑,例如只有某些人可以过渡)。