Any help would be appreciated with this.
I'm using script runner to prepopulate a field if the field is currently empty.
I have:
def value = getFieldByName('Acceptance Criteria').value
def field = getFieldByName('Acceptance Criteria')
to get the value of the field Acceptance Criteria
I should then be able to write:
if(value == null) {
field.setFormValue('Not Null')
}
But that's not working
To try and figure out why its not working I wrote this:
def value = getFieldByName('Acceptance Criteria').value
def field = getFieldByName('Description')
field.setFormValue(value)
if(value != null) {
field.setFormValue('Not Null')
}
So if the field Acceptance Criteria is not null the Description field would populate with "Not Null"
That works. Unfortunately it also populates Not Null when the Acceptance Critieria field is empty.
So even though the field is empty the system does not recognize it as null.
Anyone have any idea how to fix this?