Hello,
I have one field set on visible in many screens. I want to change it to hidden using groovy. Can anyone help me with this?
This is my not working code
CustomFieldManager customFieldManager = ComponentAccessor.getCustomFieldManager()
CustomField customField = customFieldManager.getCustomFieldObject(11111)
def valueOfCustomField = customField.g
Collection<CustomField> allCustomFields = customFieldManager.getCustomFieldObjects()
for(CustomField e : allCustomFields){
log.info(e.getName())
}
Hello @lpopek
Why do you want to change it to hidden? Under what condition?
With SR plugin, we generally use Behaviour module to make fields hidden or shown based on some criteria
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
Hidden fields
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html#_hidden_fields
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.