Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Issue while adding label during jira ticket creation using Python

Vivek Venkatesan November 28, 2021

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.

0 answers

Suggest an answer

Log in or Sign up to answer