Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

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,556,417
Community Members
 
Community Events
184
Community Groups

Help Getting ScriptRunner Validators Working

Hello all -

We had a consultant some years ago write a few ScriptRunner transition validators, and after updating JIRA to 7.1.7 they no longer work. Unfortunately there was little to no documentation from the consultant, and not knowing how to fix or write new Groovy validators, I'm at a loss. We had two validators:

  1. On the Accept Transition: Story Points must be a Fibonacci number:
    cfValues['Story Points'].toInteger() in [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]
  2. Story Points must be greater than zero before transition to Closed:
    cfValues['Actual Points'].toInteger() > 0

These allegedly worked before according to the users of the workflow in question. Any help would be greatly appreciated, I am sure to someone who knows Groovy at all can make short work of it, but I've spent hours on this and haven't been able to figure it out.

Thanks!

1 answer

0 votes
Thanos Batagiannis [Adaptavist]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jul 28, 2016

Hi Cristopher,

The first condition should be 

def storyPoints = cfValues['Story Points']?.value as Integer 
return storyPoints in [1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233]

and the second one 

cfValues['Actual Points']?.value > 0

regards

Thanos

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events