Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Issue while adding label during jira ticket creation using Python

Vivek Venkatesan November 28, 2021 edited

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
TAGS
atlassian, team '25, conference, certifications, bootcamps, training experience, anaheim ca,

Want to make the most of Team ‘25?

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
AUG Leaders

Upcoming Jira Events