Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Fast-track transition an issue : How to Fast-track when value is < 250

Fabian van den Barselaar
Contributor
June 8, 2015

I have a (custom) field "Amount" - ID : 12704  (number field)

I want to check on create, when value is less or equal to 250, fast-track to the next status.

 

I tried:

cfValues['12704'] <= 250

and :

parseInt(cfValues['12704']) <= 250

 

But no success unfortunate...

Who can help?

 

2 answers

1 accepted

0 votes
Answer accepted
Sander Brienen [Avisi]
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.
June 10, 2015

the Amount custom field appeared to be a Number and therefore returns a Double.

Comparing a Double in this I solved by this line of code:

cfValues['Amount'] &lt; Double.valueOf(250)
0 votes
JamieA
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.
June 9, 2015

Maybe:

cfValues['12704'] as Integer <= 250

Fabian van den Barselaar
Contributor
June 9, 2015

Too bad, didn't do the trick

JamieA
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.
June 9, 2015

Sorry, it should be: cfValues['Name of custom field'] as Integer < 999

Fabian van den Barselaar
Contributor
June 9, 2015

I tried: cfValues['Amount'] as Integer < 999 cfValues['12704'] as Integer < 999 cfValues['Amount'] as Integer < 250 cfValues['12704'] as Integer < 250 but none of them triggers it :(

JamieA
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.
June 9, 2015

the first and third are the same right...? If that is the field name, and assuming it doesn't have any trailing whitespace (check) it should work. Have you checked the log for errors?

SMAtlassianMber
Contributor
November 14, 2018

Wondering if anyone got this to work. I'm getting the following error for cfValues['One Time Cost'] as Integer < 11000

The script could not be compiled: <pre>org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script97.groovy: 1: expecting EOF, found '(' @ line 1, column 37. cfValues['One Time Cost'] as Integer < 11000 ^ 1 error </pre>.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events