Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Issue while adding label during jira ticket creation using Python

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
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

870 views 25 28
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you