[英]How to transition to a status not listed on transitions?
我正在嘗試將問題從一種狀態轉換為另一種狀態。
當我打電話
jira.statuses()
我得到的狀態列表包括要轉換為的狀態:
<JIRA Status: name=u'Scheduled', id=u'11301'>
當我ping https://our.server/rest/api/2/issue/issue_id/transitions時,我得到以下響應:
{
"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":{}}
我是否需要將此狀態添加到轉換中? 還是我需要在過渡中包含更多數據? 我不太確定該如何診斷。
您只能將其更改為從當前狀態轉換為所需狀態的狀態。 如果您的工作流程必須嚴格遵循“待辦事項”->“進行中”->“已解決”->“已關閉”,並且當前票證位於“待辦事項”中,並且您希望將其設為“已關閉”,則您必須經歷每個狀態才能到達那里,並且如果您沿途需要字段,則也必須傳遞這些字段,例如,從未解決狀態變為已解決狀態通常需要解決。 除此之外,您不應受到限制(除非您在轉換的條件/驗證器中內置了某種其他邏輯,例如只有某些人可以轉換)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.