Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Unable to clear error message after entering wrong value in behaviour custom field

We have a custom field where we want to get inputs between 1-10 only, and inputs apart from this range should give error message. So when we put incorrect value it gives the error message but after clearing the incorrect value and trying to keep the field blank it still throws error message. 


This is the script which we are using:

def abvField = getFieldById("customfield_12404")
def abvValue = getFieldById("customfield_12404").getValue() as Integer //Actual Business Value

if (abvValue > 10 || abvValue <1 )
abvField.setError("This field should contain a number value between 1-10")
else { abvField.clearError()}

1 answer

1 accepted

1 vote
Answer accepted
Leo Community Leader Nov 06, 2019

Hi @anshu02

Seems like this is a known issue with behaviour it does not work on when field clears it keep on holds the previous value

The workaround I can suggest you to consider script validator in workflow or custom listener

you can place validator script something like below

def value = cfValues['Filed Name for validation'] as Integer
if(value < 11 && value > 0){
return true
return false
return true



Is there still no fix for this yet? @Leo 

Really need to make use of the behavior plugin instead of the validator and this bug is causing huge trouble. 

Would really appreciate any help

I have encountered the same issue on my end as well. Can someone comment on a possible workaround?

Suggest an answer

Log in or Sign up to answer