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
4,370,158
Community Members
 
Community Events
168
Community Groups

Regular Expression Check (JSU)

Edited

Hello,

 

Im trying to add a validator with alert message pop up if storypoint is not within the Fibonacci Sequence. However, the below code is appearing to alert for all numbers. Please assist with the below?

  • Regular expression: Option [1,2,3,5,8,13,21,34,55,89,144Story Point.JPG

1 answer

0 votes
Mikael Sandberg Community Leader Sep 20, 2022

You could try this regular expression, I used a version of it way back in the days when I did a lot of Perl scripting:

(?x) .? | ( \\2?+ (\\1|^.) )* ..

For an explanation of it, check out this post

@Mikael Sandberg Thank you for your response! 

I have just try this script and it doesnt seem to be working. The alert appears to be stopping only 2 digits number. However, our end goal is to stop the user from entering in any numbers that not within the given option of  (1,2,3,5,8,13,21,34,55,89,144)

Any other ideas?

@Mikael Sandberg Okay i think i got this to work. However do you know if Jira will allow us to put this into Prod at a specific date? Example, if i want to implement this script next week and anything before next week does not need to follow this rule.

Like Mikael Sandberg likes this
Mikael Sandberg Community Leader Sep 22, 2022

i guess you could if you have an app that allows you to add scripts to the workflow that checks when the issue was created, but that seems to be a lot of work to get it working. Your other option would be to create a new issue type with a new workflow and "retire" the existing issue type, but if it was my environment I would not recommend it.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events