我正在使用 JIRA Python API 创建 Issue

I am using JIRA Python API to create Issue

我正在使用以下代码创建问题:

from jira import JIRA
import pandas as pd
user = 'XXXXXXXXXXXXXXX@gmail.com'
apikey = 'XXXXXXXXXXXXXXXXXXXXXXX'
server = 'https://XXXXXXX.atlassian.net'

options = {'server': server}
jira = JIRA(options, basic_auth=(user,apikey) )

# summary = issue.fields.summary

issue_List=[]

readexcel=pd.read_excel(r'test1.xlsx')
for item in readexcel.index:
 isssue_dict=dict()
 isssue_dict['project']=dict({'key':'MYB'})
 isssue_dict['summary']=readexcel['Summary'][item]
 isssue_dict['description']=readexcel['Description'][item]
 isssue_dict['issuetype']=dict({'name':'Bug'})
 # isssue_dict['customfield_10014']=readexcel['Epic Link'][item]
 isssue_dict['priority']={'name':readexcel['Priority'][item]}
 isssue_dict['labels']=[readexcel['Labels'][item]]
 isssue_dict['reporter'] :dict({'name':readexcel['Reporter'][item]})
 isssue_dict['assignee']=[readexcel['Assignee'][item]]
 new_issue = jira.create_issue(fields=isssue_dict)
 print(new_issue._str_())

我无法将 {versions:[{`Affects Version\s':Affects version}]} 和 Epic Link 放在 Jira issue

为了设置史诗信息,请使用add_issues_to_epic(epic_id, issue_keys, ignore_epics=True)。 如果版本已经存在,使用键versionsfixVersions设置受影响的版本和修复版本。

有关这些方法的完整文档,请参阅 https://jira.readthedocs.io/en/master/api.html