Hi, i want to validate story point with regex, users only can choose 1,2,3,5,8,13,21 i write this /^(1|2|3|5|8|13|21)$/ but not working, get this error
Field Story Points with actual value '5.0' does not match regular expression /^(1|2|3|5|8|13|21)$/
Hi ნოდარ ვარდიაშვილი, Nodar.Vardiashvili@space.ge
Where are you trying to perform this validation with the regular expression? For example, in custom code you wrote, an automation rule, etc.
Have you tried to floor or format the story point value before performing the comparison?
Kind regards,
Bill
Hi, I am trying it in workflow, add this validation on issue create transition
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for that information. Please try this expression:
((1|2|3|5|8|13|21)(\.0))
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Bill Sheboy - As per the above regex expression, we can't use the floating number in Story Points field. Can you please confirm the regex expression to include floating number in Story Points field?
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First thing, as this is an older thread I recommend creating a new question, perhaps with a link back to this one. That will ensure the maximum number of people see it to offer suggestions.
Back to your question...
What problem are you trying to solve?
What do you mean by "we can't use the floating number in Story Points field"?
The Story Points field displays integers in the UX, and it returns integers with the REST API, but non-integers in automation rules.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi there!
To make your regex work for both whole numbers and floating-point numbers, you can modify it to allow for optional decimal points and trailing zeros. Here's the modified version which you can try out instead:
Let me know if it works! ;)
/G
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, same problem
Field Story Points with actual value '3.0' does not match regular expression /^(1|2|3|5|8|13|21)(\.0)?$/gm
I try to add 3 in story points but get this error
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.