Hi Community,
Scriptrunner Jira Datacenter: how to hide the option in checkbox custom field
Thanks.
Hi @Saqib Dar ,
you can implement that through a behaviour (https://docs.adaptavist.com/sr4js/latest/features/behaviours).
A simple code could be the following :
def singleSelect = getFieldByName("YOUR_CUSTOM_FIELD_NAME_HERE")def optionsManager = ComponentAccessor.getOptionsManager()def cf = getFieldByName("FieldName")def cfField = customFieldManager.getCustomFieldObject(cf.getFieldId())def cfConfig = cfField.getRelevantConfig(getIssueContext())def cfOptions = optionsManager.getOptions(cfConfig)def cfA = cfOptions.findAll { it.value in ["A","B","C","D"] }.collectEntries { [ (it.optionId.toString()) : it.value ] }cf.setFieldOptions(cfA)
Hope this helps,
Fabio
@Fabio Racobaldo _Catworkx_ thanks it works
I'm happy for that
It looks like you're new here. Sign in or register to get started.