It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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 vote
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



Suggest an answer

Log in or Sign up to answer

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you