无法在python中创建jira问题



from jira import jira

jira = jira (basic_auth=("soubhagyakumar666@gmail.com", "9uQ7ll78jq7AmY3Xh5ghF9A9"), options={"server": "https://soubhagyapradhan.atlassian.net"})

Jira集成代码

data = {
"project":
{
"key": "TEST"
},
"summary": "REST ye merry gentlemen.",
"description": "Creating of an issue using project keys and issue type names using the REST API",
"issuetype": {
"name": "Bug"
}
}
res = jira.create_issue(fields=data)
print(res)

输入

错误
raise JIRAError(
jira.exceptions.JIRAError: JiraError HTTP 400 url: https://soubhagyapradhan.atlassian.net/rest/api/2/issue

response headers = {'Date': 'Thu, 10 Nov 2022 18:55:40 GMT', 'Content-Type': 'application/json;charset=UTF-8', 'Server': 'AtlassianEdge', 'Timing-Allow-Origin': '*', 'X-Arequestid': '99553b2ab107cf312060560b7e28c34f', 'X-Aaccountid': '5c2cfc199760f569b62799f9', 'Cache-Control': 'no-cache, no-store, no-transform', 'Expect-Ct': 'report-uri="https://web-security-reports.services.atlassian.com/expect-ct-report/atlassian-proxy", max-age=86400', 'Strict-Transport-Security': 'max-age=63072000; preload', 'X-Content-Type-Options': 'nosniff', 'X-Xss-Protection': '1; mode=block', 'Atl-Traceid': 'f18031aca50ee85e', 'Report-To': '{"endpoints": [{"url": "https://dz8aopenkvv6s.cloudfront.net"}], "group": "endpoint-1", "include_subdomains": true, "max_age": 600}', 'Nel': '{"failure_fraction": 0.001, "include_subdomains": true, "max_age": 600, "report_to": "endpoint-1"}', 'Transfer-Encoding': 'chunked'}
response text = {"errorMessages":[],"errors":{"issuetype":"Specify an issue type"}}

我使用上面的代码在jira中创建门票。我得到以上的错误,而创建票。请看看我该如何解决这个问题

尝试先在Jira项目中创建您的问题类型。

项目设置->细节→发行类型->添加问题类型->"name" & lt; my_issue_type_name>