使用python通过JIRA API创建问题会导致HTTP 400错误
我是python新手,正在尝试创建简单的脚本,这将在JIRA中产生新问题 我不知道我的代码出了什么问题使用python通过JIRA API创建问题会导致HTTP 400错误,python,python-2.7,jira,jira-rest-api,python-jira,Python,Python 2.7,Jira,Jira Rest Api,Python Jira,我是python新手,正在尝试创建简单的脚本,这将在JIRA中产生新问题 我不知道我的代码出了什么问题 from jira.client import JIRA options={'server': 'https://jira.my_jira.com'} jira=JIRA(options,basic_auth=('user', 'pass')) root_dict = { 'project' : { 'key': 'project_name' }, 'summary' : 'Te
from jira.client import JIRA
options={'server': 'https://jira.my_jira.com'}
jira=JIRA(options,basic_auth=('user', 'pass'))
root_dict = {
'project' : { 'key': 'project_name' },
'summary' : 'Test auto created issue',
'description' : 'Ignore this. will be deleted shortly',
'issuetype' : { 'name' : 'Task' },
}
my_issue= jira.create_issue(fields=root_dict)
误差是有限的
JIRAError:HTTP 400:“需要帐户。”
有人能告诉我出了什么问题吗?你的代码对我来说很有效(在替换了相关值之后),而且看起来很正确(尽管我必须编写
jira=jira(options=options,basic_auth=…)
,以避免警告)。在basic\u auth中指定的用户代码>当前是否存在于JIRA服务器上?我怀疑不是。谢谢你的回答!我发现了这个问题——所有问题都需要自定义字段,它的名称实际上是Account。为该自定义字段传递值后,一切正常