'I am using JIRA Python API to create Issue
I am using following code to create an issue :
from jira import JIRA
import pandas as pd
user = '[email protected]'
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_())
I am not able to put {versions
:[{`Affects Version\s':Affects version}]} and Epic Link on Jira issue
Solution 1:[1]
In order to set the Epic information, please use add_issues_to_epic(epic_id, issue_keys, ignore_epics=True)
.
If the version already exists, use the keys versions
and fixVersions
to set the Affected Version and Fix Version.
See https://jira.readthedocs.io/en/master/api.html for a full documentation of these methods.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Lennart Steinke |