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
Community Members
Community Events
Community Groups

Changing the name of a custom field drop-down list item


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?

3 answers

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.

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.

0 votes
Iain Dooley Community Leader Jul 19, 2021

@Павел Кривко 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.

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:

  1. Using the REST API, GET all the options from the dropdown list as an array
  2. In your code, remove the option element from the array and replace it with the new option element.
  3. Using the REST API, sequentially DELETE all the existing options from the dropdown list.
  4. Using the REST API, sequentially POST all the new options to the dropdown list from your array.

@David Bakkers 

Agree. I checked my code, adding colour via code is when you add a new option. 

@Павел Кривко please note.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Trello

Taco Tuesday: New years' resolutions with Trello

Congratulations to @Laura Holton , our latest winner of Taco Tuesday! And thanks to @Kristján Geir Mathiesen for sharing the picture of Taco having fun with his new friend  B...

2,411 views 28 42
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you