API Custom Field issues


Frustrated with PUT’ing custom fields. I’m using javascript (google script).

As per:

and another thread I found and now can’t find again in which you say an “obscure” bug was found.

the root issue is that API isn’t symmetrical so can’t FETCH and PUT a task (the JSON exactly as it’s FETCHed) without a “Value cannot be an array error” as custom fields are not expected to be an array when posted for some reason

but in trying to workaround by only updating the custom field rather than the whole task with {‘data’: {‘custom_fields’: id : new-value}} using the id I get from FETCHing the task I get “Custom field with ID id is not on given object”, I can’t figure out what’s going on there.

Be great to see some working javascript to FETCH a task, change a custom field value and PUT it.



What I can say is that fetching data gives you object like {id:X} while pushing data needs to push only the id. Does it help?
cc @Diakoptis who is the best at API stuff :stuck_out_tongue:


Thanks, not to worry I sorted it


How? :stuck_out_tongue: share your solution for others :wink: