Forums

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

Setting "Yes"/"No" field when submitting a ticket using Python API

Craig Anderson
Contributor
March 8, 2023

I'm trying to set a bug ticket field that can be "Yes" or "No" in the UI.

The field name is "customfield_11550" ("Regression")

I tried a bunch of different things:

ticket["customfield_11550"] = [{"name": "Yes"}]
ticket["customfield_11550"] = {"name": "Yes"}
ticket["customfield_11550"] = {"name": "yes"}
ticket["customfield_11550"] = {"name": True}

I get back:

"Specify a valid 'id' or 'name' for Regression"

 

1 answer

1 accepted

1 vote
Answer accepted
Craig Anderson
Contributor
March 9, 2023

Through lots of trial and error, found the answer:

 

ticket["customfield_11550"] = {"value": "Yes"}

 

The error message is IMHO quite misleading - it talks about "name", but you need to use "value".  Arg!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events