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
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.