JSUTIL Field Validation using Regex on Story Points

I want to limit the value of story points to 1.2 or 3, so I have added a Regular Expression check of 

[1-3]

But when I enter a valid number, the validation fails.

3 answers

1 accepted

When processing the validating the value, some where during the transition the value I typed 3, became 3.0 and the regular expression of "[1-3]" failed. I changed it to "[1-3](?:\.[0-9])?" and it works.

Steven Behnke Community Champion Jun 15, 2015

Steven, all number fields in JIRA are doubles. Apparently your regex validator didn't like comparing integers to doubles. :) https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html

0 vote
Steven Behnke Community Champion Jun 12, 2015

Could you add an image of the validation failing? I assume it throws an error...

Steven thanks for putting me on the right path. When I looked at the transition screen, I saw the message Field Story Points with actual value 3.0 does not match regular expression "[1-3]" I figured it out the issue.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Amir Kazemi
Posted an hour ago in Jira

We want to know what Jira Service Desk apps you're using!

Hi Community! My name is Amir and I’m on the Jira Service Desk product marketing team at Atlassian. Our team would love to understand how you’re leveraging our ecosystem for Jira Service Desk. Wha...

10 views 0 2
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you