Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,367,335
Community Members
 
Community Events
168
Community Groups

Update custom field using jira-python

issue.update(fields={'customfield_10100': {'value','Two'}})

I have a multiselect list and below error occurs if i try to update

"response text = {"errorMessages":[],"errors":{"Custom_field":"data was not an array"}}"

1 answer

1 accepted

3 votes
Answer accepted
Shaun S Atlassian Team Jul 29, 2017

Hi Amar,

 

I was able to set the field values for a multi-select field by correcting the syntax of the code you provided.  I used the REST API Example as a guide.  If you change the code to read as 

issue.update(fields={'customfield_10100': [{'value':'Two'}]})

I believe it should work. 

yes thank you for the reply.. i did figured it out

Hey i need to modify single select field (drop down)  i tried below code.

1. issue.update(fields={'customfield_11104': 'Staging'})

2. issue.update(fields={'customfield_11104': [{'value': 'Staging'}]})

3. I tried this one also issue.update(fields={'customfield_11104':[{'value':'46707'}]})

but got the error like 

response text = {"errorMessages":[],"errors":{"customfield_11104":"Could not find valid 'id' or 'value' in the Parent Option object."}}

This customfield_11104 is a single select dorp down field.

Suggest an answer

Log in or Sign up to answer