I am trying to create a new jira issue using Python. I want to add label(s) - IMPORTED and TESTING to tickets, but the ticket creation fails as there is issue with the dictionary submitted to JIRA.
new_issues=[]
new_issue = {
'project': {"key":"TEST JIRA"},
'summary': 'Test Summary',
'description': 'Test ticket created by Jira Integration'
}
if result == 'positive':
new_issue['labels']: {[{"add": 'IMPORTED'}, {"add": 'TESTING'}]}
else:
new_issue['labels']: {[{"add": 'IMPORTED'}]}
jira.create_issues(field_list=new_issues)
Error message:
unhashable type: 'list'
Please advise how to add labels to jira issue while creating one.
Spend the day sharpening your skills in Atlassian Cloud Organization Admin or Jira Administration, then take the exam onsite. Already ready? Take one - or more - of 12 different certification exams while you’re in Anaheim at Team' 25.
Learn more