I have a checkbox list where some of the options have been disabled and I need to be able to see if a user has checked all the options.
I was just counting the options the user has selected vs how many are on the list:
def cf = ComponentAccessor.getCustomFieldManager().getCustomFieldObjectByName("User Sign-off")
def options = ComponentAccessor.getOptionsManager().getOptions(cf.getConfigurationSchemes().listIterator().next().getOneAndOnlyConfig())
def values = issue.getCustomFieldValue(cf)
if (options && values) {
if (options.size() == values.size()) retval = "True"
}
But this fails due to the disabled options. I can't seem to be able to tell which options are disabled and which are not. I think I am going to have to iterate over all the (not disabled) options and make sure that the user has selected them but I am stuck as I can't seem to be able to find the disabled status of each option.
I'm sure it should be simple - I've found ways to disable options but not to see if they are disabled.