Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

whether field value is empty[ScriptRunner]

arno
Contributor
January 8, 2024

Hi all

I am using ScriptRunner to write a Behaviours and need to determine whether the field value is empty and set the field to read-only. My custom field is text, but I have tried several ways but cannot determine. Could you please tell me the correct code:


def Field = getFieldById(getFieldChanged())
def value = Field.getValue()

if ( value != null ){

    Field.setReadOnly(true)

}

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events