Invalid value for custom field type

Patricio_Christian_Garcia April 12, 2020

Hi,

I am working wtih Python and when I tried to update a custom field I have this eror

Invalid value for custom field type

Update Custom Field item on Card

PUT /1/cards/{idCard}/customField/{idCustomField}/item

Documentation example

{
 "value": {
 "text": "<string>",
 "checked": true,
 "date": "2018-03-13T16:00:00.000Z",
 "number": 2154
 }
}

I need to set number field but I do not know how pass this parameter in the querystring variable.

querystring = {'number': '123',"key":KEY,"token":TOKEN}

response = requests.request("PUT", url, params=querystring)

Thanks a lot for you help, I appreciate so much.

 

Patricio.

2 answers

0 votes
Iain Dooley
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 14, 2020

@Patricio_Christian_Garcia yeah the trello Custom Fields API is an absolute crime against humanity. I copied and pasted my way through it from a bunch of random StackOverflow answers, you can see the finished product here, if you look at the various function calls and so on, in my implementation of a straight forward "setCustomFieldValue" wrapper around it for my Trellinator framework:

https://github.com/iaindooley/trellinator-libs/blob/master/Card.js#L1401

I don't know enough Python to easily translate that but it's all just HTTP calls so should be easy enough to adapt to your purposes.

0 votes
Vini
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 13, 2020

Hi Patricio! Welcome to Trello Community!

While there are no rules agains posting more technical questions here, developers usually have more luck in the dedicated dev community: https://community.developer.atlassian.com/c/trello

There you will be able to collaborate with other Trello Champions and Engineers.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events