I used a translator
In some cases, I need to rename an element of the drop-down list of custom fields. I didn't find a specific API method for my goal. There is an idea to first delete an element, and then add a new one, but I don't want to make unnecessary movements. Maybe there is still an API method that allows you to rename a drop-down list item?
I wrote this to change the option list via code. I have not tried remaining but I am able to change the colour so it might be able to ‘rename’.
@David Bakkers change of colour can be done with code.
https://trello.com/c/iw8Hc4cF
Thanks @milynnus
I just tested it and you're right, you can set the option's color via the REST API when you create that option:
"value": {
"text": "Green option"
},
"color": "green"
I've removed that from my answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Павел Кривко you can't rename custom field list items, what is it you're trying to achieve though? There might be another way to do it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Павел Кривко
Sorry, but the Trello REST API currently only allows the options of a custom field to be looked up, deleted or added, but not renamed. Renaming the options or changing their order can only be done via the web GUI.
If you do want to use the REST API to rename a single option in a dropdown list, you have to essentially tear down the existing options and then rebuild them, like this:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Agree. I checked my code, adding colour via code is when you add a new option.
@Павел Кривко please note.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.