如何使用jira-python设置fixVersions字段 [英] How do you set the fixVersions field using jira-python

查看:483
本文介绍了如何使用jira-python设置fixVersions字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用jira-python模块(http://jira-python.readthedocs.org/en/latest/)更新现有的JIRA.具体来说,我正在尝试设置问题的fixesVersion列表.我已经尝试了一段时间没有运气了.我想念什么?

I'm trying to update an existing JIRA using the jira-python module (http://jira-python.readthedocs.org/en/latest/). Specifically I'm trying to set the fixesVersion list of an issue. I've been trying for a while with no luck. What am I missing?

issue = jira.issue('DUC-391')
issue_dict = { 'fixVersions' : [{'id': '10115'}] }
issue.update(fields=issue_dict)

返回stackTrace:

Returned stackTrace:

Traceback (most recent call last):
  File "post-commit-jira.py", line 35, in <module>
    issue.update(fields=issue_dict)
  File "/Library/Python/2.6/site-packages/jira/resources.py", line 193, in update
    super(Issue, self).update(**data)
  File "/Library/Python/2.6/site-packages/jira/resources.py", line 72, in update
    raise_on_error(r)
  File "/Library/Python/2.6/site-packages/jira/exceptions.py", line 29, in raise_on_error
    error = errorMessages[0]

推荐答案

玩了更多,发现了错误.

Played around more with it, realized the error.

由于未设置某些必填字段而失败.原始问题中插入的代码是可以的,但是来自jira-python库的错误报告仍然有很多不足之处...

It was failing due to some required fields being unset. Code snipped in the original question is ok, error reporting from the jira-python library however leaves a lot to be desired...

这篇关于如何使用jira-python设置fixVersions字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆