在 Git 提交时关闭 JIRA 票证
Close JIRA ticket on Git Commit
我正在尝试关闭 post-接收挂钩上的所有 JIRA 票证。我的 python 脚本在 post-receive 上执行,从提交消息中我能够获得 JIRA 票号并在 JIRA 中也找到了票。
一切正常,但是当我想使用以下代码更改 JIRA 票证的状态时,收到来自 JIRA 服务器的错误 400 错误请求响应。
jira.transition(issue,'31')
还尝试给出 500 内部服务器错误。
jira.transition_issue(issue, '5', assignee={'name': 'pm_user'}, resolution={'id': '3'})
请帮助我如何更改工单的状态。
使用 JIRA 进行身份验证并使用
查找票证
issue = jira.issue(issuekey)
也成功但无法将工单状态更改为"Done"。
“500 internal server error”表示服务器端错误,您的 Jira 管理员可以通过获取错误消息为您提供一些线索。
检查 this thread 以查看解决方案是否适用:
Here's the python solution, which is what I'm working with. The transition IDs are part of the Workflow view, but not everyone can see those IDs. In my case I can see the graph but JIRA doesn't actually display what the IDs are in order to make it work.
You'll note that for the start of each section is an id and a number. Those are the numbers that you need and they CAN be different so you'll want to look at an issue in every one of the states and dump out their transitions to see what the ids are.
我正在尝试关闭 post-接收挂钩上的所有 JIRA 票证。我的 python 脚本在 post-receive 上执行,从提交消息中我能够获得 JIRA 票号并在 JIRA 中也找到了票。
一切正常,但是当我想使用以下代码更改 JIRA 票证的状态时,收到来自 JIRA 服务器的错误 400 错误请求响应。
jira.transition(issue,'31')
还尝试给出 500 内部服务器错误。
jira.transition_issue(issue, '5', assignee={'name': 'pm_user'}, resolution={'id': '3'})
请帮助我如何更改工单的状态。 使用 JIRA 进行身份验证并使用
查找票证issue = jira.issue(issuekey)
也成功但无法将工单状态更改为"Done"。
“500 internal server error”表示服务器端错误,您的 Jira 管理员可以通过获取错误消息为您提供一些线索。
检查 this thread 以查看解决方案是否适用:
Here's the python solution, which is what I'm working with. The transition IDs are part of the Workflow view, but not everyone can see those IDs. In my case I can see the graph but JIRA doesn't actually display what the IDs are in order to make it work.
You'll note that for the start of each section is an id and a number. Those are the numbers that you need and they CAN be different so you'll want to look at an issue in every one of the states and dump out their transitions to see what the ids are.