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?
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
//Any ticket number can be used that has the targeted custom field
issue = ComponentAccessor.getIssueManager().getIssueObject(
customField = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName(
optionsManager = ComponentAccessor.getOptionsManager()
options = optionsManager.getOptions(customField.getRelevantConfig(issue))
Hey @Ravi Sagar
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.
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.
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 issue..how to block it from creating issues with disabled options.
Suggest me some answers,
Thanks in Advance
For JSM June Challenge #2, share how your non-technical teams like HR, legal, marketing, finance, and beyond started using Jira Service Management! Tell us: Did they ask to start using it or...
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