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
Still thinking about joining us for Team '25 Europe? Early bird has been extended for just one week! Now’s the time to lock in your lowest rate. Use code TEU25COMM-20 to save 20% at checkout. Hurry, this only lasts for 1 more week.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.