Can anyone help me with regular expression check on jira behaviors

Vineela Durbha November 27, 2018

I am not getting a way for regular expression check on jira behaviors. ca someone help with the syntax on the same

I have tried as below, but it is allowing [A-Z] even

FormField ABP = getFieldById(getFieldChanged())
String ABPVal = ABP.getValue();


def regex= /[a-z]*/
def match = (ABPVal=~ regex);

if(ABPVal =~regex )

{
ABP.clearError()
}
else{
ABP.setError("No no")

1 answer

Suggest an answer

Log in or Sign up to answer
0 votes
Vineela Durbha December 2, 2018

I have tried as below, but it is allowing [A-Z] even

FormField ABP = getFieldById(getFieldChanged())
String ABPVal = ABP.getValue();

def startsWithSpace=ABPVal.toString().startsWith(' ');
def regex= /[a-z]*/
def match = (ABPVal=~ regex);

if(ABPVal =~regex )

{
ABP.clearError()
}
else{
ABP.setError("No no")

TAGS
AUG Leaders

Atlassian Community Events