Forums

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

Update custom field using jira-python

thekngmkr2015 July 19, 2017
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"}}"

2 answers

1 accepted

3 votes
Answer accepted
Shaun S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 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. 

thekngmkr2015 July 30, 2017

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

deepak_rohilla September 19, 2022

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."}}

Like • Carlos Catrilef likes this
deepak_rohilla September 19, 2022

This customfield_11104 is a single select dorp down field.

0 votes
Helen Black
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 29, 2023

The metadata for my single select dropdown field includes "set", "value" and "id" and I found that only  "id" worked as follows:

 issue.update(fields={'customfield_11104': {'id':'10034'}})

I found the "id" for my field as follows:

jira = JIRA(jira_server, basic_auth=(jira_user, jira_token))
meta = jira.editmeta('ABC-1')
print(meta)

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, team '25 europe, atlassian event, barcelona 2025, jira, confluence, atlassian intelligence, rovo, ai-powered collaboration, developer tools, agile teams, digital transformation, teamwork solutions, atlassian conference, product announcements

🌆 Team '25 Europe registration is now open!

Join the largest European gathering of the Atlassian Community and reimagine what’s possible when great teams and transformative technology come together. Plus, grab your Super Fan ticket now and save over €1,000 on your pass before prices rise on 3 June.

Register now
AUG Leaders

Atlassian Community Events