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.