Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can you bulk disable custom field values from within Jira?

I have a scenario where several hundred field values need to be disabled for a multi-select list custom field in Jira. Is there any way to bulk disable custom field values within the Jira interface, perhaps with Scriptrunner?

Or, is disabling values one by one the only way to handle this from within Jira?





3 answers

I was able to use this to disable options from a customfield. I can't remember what kind of customfield it was but it may lead you to the right place. This script was used in the Script Console


import com.atlassian.jira.component.ComponentAccessor 
//Any ticket number can be used that has the targeted custom field
def issue = ComponentAccessor.getIssueManager().getIssueObject("JA-iiii")
def customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("Custom-field Name")
def optionsManager = ComponentAccessor.getOptionsManager()
def options = optionsManager.getOptions(customField.getRelevantConfig(issue))
if (options)


Awesome! Thanks for sharing @Raynard Rhodes - I appreciate it!

-- Andrew

This script worked like charm!! Thankyou!!!

Hi ,


I have a custom field[Single Select list] with 5 options in it. I have disabled one option with Custom Field Configuration in Jira. When i import issues with CSV with disabled Custom Field Option it is creating new to block it from creating issues with disabled options.

Suggest me some answers,


Thanks in Advance

0 votes

Hi @Andrew Zimmerman 

Can you explain your use case a bit in detail?

Using ScriptRunner you can create a behaviour to disable those values or split the custom field contexts and few more things as well with a custom script.


Hey @Ravi Sagar _Sparxsys_

Sure thing. Essentially the custom field is a multi-select list of our customers over the years. We formatted it this way so that users would not make errors in spelling or use inappropriate shorthand/abbreviations when referring to customers. With a select list, we can ensure the customer names on tickets are always spelled the same way, we can use the values in logic, and VLOOKUPs with data manipulation from reports from other systems, etc. 

Because this field is available in many of our Jira projects and because it's considered the standard authoritative source for customer names in Jira, it only has one, global field context.

Over the years it's become extremely bloated as lapsed customers or accounts that are no longer active are still selectable. We still need their values in Jira to query and report on, but they will not be newly selected, so I'd like to disable them to clean up the current selectable list for end users.

I have a CSV of exactly the custom field value options that need to be disabled, exactly as they are spelled in Jira. Since it's several hundred values, I'd love to be able to import that list and have Jira disable any value that matches for my specified custom field, rather than doing so one by one in the Custom Field>Edit Options page.

But, that's where I'm stuck. I'm not sure such a thing is possible within the Jira UI.

Hi Andrew, I have a similar scenario. Were you able to figure it out?

Hey @Jaswanth P !

I wasn't able to find a solution that utilized my CSV list. But, @Merita Bushi, another admin on our team, discovered that you don't have to wait for the enable/disable/edit request to resolve in your main "edit options for custom field" screen if you open in a new tab.

So, I'm able to get through these pretty quickly by simply command+clicking (I'm on a Mac) on the "Disable" option as I scroll down the custom field value options.

I can't completely vouch for safety of this method regarding system performance, although I haven't had problems. You may want to monitor your CPU or perform this task outside of prime business hours just in case. I was just tired of waiting for the value option list to refresh after every single edit or disable action. Since the total list is so long, it would take 15s to refresh after making an option edit, disable, or enable and when you have to edit or disable 100 options, that really adds up.

Hopefully this helps a little,


Thanks Andrew. Not a bad approach if we can spend few minutes. I will try it. I have about 500 values to disable and was planning to write a SQL script to set the 'disabled' flag to 'Y' in customfieldoption table. 

It would be great if scriptrunner or Atlassian themselves provide some solution to this.

Right, yeah with 500 it'll take a bit done manually. Sounds like you're going to work through this method and have already seen this page, but linking it here just in case!

I scanned through some developer docs but couldn't figure out how to do what I was searching for. I came upon a few potentially related tickets, but one is already resolved as won't do.

There could very well be a useful fragment in the Scriptrunner Library. I just couldn't find it and decided to start going through the list manually. 

If you go with the SQL script route, I'd be interested in hearing how it turns out and if the process was relatively straightforward or not.

Take care,


Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira

Do you use Jira Cloud with Microsoft Teams?

Hi, Jira users! Do you use Jira alongside Microsoft Teams? We want to hear how you’ve used the power of Jira Cloud and Microsoft Teams (via the Jira Cloud for Microsoft Teams app) to achieve a team...

316 views 1 5
Read article

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