无法通过jira python rest api创建新问题

时间:2014-04-07 06:00:43

标签: jira jira-rest-api python-jira

            from jira.client import JIRA
            from jira.exceptions import JIRAError
            from jira.resources import Attachment, Comment,
        import time
        import types
      from sets import Set
      import xlrd
      import sys, getopt
      import getpass

       sel_server = 'https://dkbdkb7qja.ww007.net/'
       sel_user = "karthikeyan@xxxxxx.com"
        password = getpass.getpass()
        password:
         jira = JIRA(basic_auth=(sel_user, password), options={'server':   sel_server, 'verify': False})

   issue = jira.issue("EHSTRACKER-54")

    new_issue = jira.create_issue(project={"key":"EHSTRACKER"},

   summary = "New issue from jira-python",

  description= "Look into this one",

  customfield_13401= "karthi",

 customfield_13403={"value":"low"},

 customfield_13404={"value":"Other"},

 priority={"name":"Minor"},

 issuetype={"name":"EHS"})

 i'm getting the following below error
=====================================

追踪(最近一次通话):   文件"",第8行,in   文件" C:\ Python27 \ lib \ site-packages \ jira_python-0.16-py2.7.egg \ jira \ client.py",第485行,在create_issue中     raise_on_error(r)的   文件" C:\ Python27 \ lib \ site-packages \ jira_python-0.16-py2.7.egg \ jira \ exceptions.py",第47行,在raise_on_error中     提出JIRAError(r.status_code,错误,r.url) jira.exceptions.JIRAError:HTTP 400:"选项ID' null'无效"

任何人都可以告诉这个错误是什么以及如何解决这个问题?

1 个答案:

答案 0 :(得分:0)

customfield_13403 = {“value”:“low”}, - >对于此自定义字段,我在自定义字段类型“选择列表”值的“小写字母”中提供了第一个字符值。值为“senetive”“低”.i提供了customfield_13403 = {“value”:“Low”}。为此我的作品。