Forums

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

How to set "versions" when creating ticket using Python API

Craig Anderson
Contributor
March 8, 2023 edited

I'm attempting to set the "versions" field in a Jira ticket.

I'm using the Python API:

ticket = {
...
ticket['versions'] = [{'name': '1.0.0'}]
}
jira_cilent.create_issue(ticket)

 

I get:

"errors":{"components":"The list contains an invalid value"}

I checked: 1.0.0 is a valid choice.

1 answer

1 accepted

2 votes
Answer accepted
Craig Anderson
Contributor
March 8, 2023

Actually, that is the correct code for setting the multiple choice version.

The problem was something else.

Carlos Garcia Navarro
Community Champion
March 8, 2023

Thanks for adding an answer to clarify! :-)

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
atlassian, likes for trees, atlassian community, social impact, tree planting campaign, community kudos, atlassian giving, environmental impact, sustainability, likes for good, atlassian social responsibility, community challenge

Make every click count—help us plant 50,000 trees! 🌳

Want to make your everyday Community actions directly contribute to reforestation? The Atlassian Community can achieve this goal by liking a post, attending an ACE, sending your peers kudos, and so much more!

Help us plant more trees
AUG Leaders

Atlassian Community Events