I need to hide None option from single list can you please help me on this
//import com.onresolve.jira.groovy.user.FormField
//import com.atlassian. jira. component. ComponentAccessor
//import com.atlassianjira.issue.customfields.manager.OptionsManager
//import com.atlassian.jira. component. ComponentAccessor
def statesField = getFieldByName("States")
def countriesField = getFieldByName("Countries")
// Retrieve the selected value from the StatesField dropdown
def selectedValue = statesField.getValue()
// Define the countries to display for each state
def countryValues = [
"Alaska": ["USA"],
"Andhra Pradesh": ["India"],
"Madhya Pradesh": ["India"],
"Karnataka": ["India"],
"Tamil Nadu": ["India"],
"Telangana": ["India"],
"California": ["USA"],
"Texas": ["USA"],
"New South Wales": ["Australia"],
"Queensland": ["Australia"],
"South Australia": ["Australia"],
]
// Set the available values of the CountriesField based on the selected value of the StatesField dropdown
countriesField.setFieldOptions(countryValues[selectedValue])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.