Forums

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

problems with cfValues script

Jason Moerbe April 21, 2014

I'm having trouble with using a script in a custom workflow.

Situation:

- i have a status called "External QA"

- I have a custom simple-drop down selector field called "Quality Control Issue (External)?". The choices in the drop down are Yes and No

- Once an issue hits the Resolved state, issues where "Quality Control Issue (External)?" = Yes must then go to the "External QA" status for final approvals and then get closed from there. Those set to No can get closed directly from the Resolved status.

- In the workflow on transition from Resolved to Closed I have a validator script of cfValues['Quality Control Issue (External)?'] == 'No'

- In the workflow on transition from Resolved to External QA I have a validator script of cfValues['Quality Control Issue (External)?'] == 'Yes'

- I have also tried "getvalue()" with each script ... cfValues['Quality Control Issue (External)?'].getvalue() == 'Yes'

Result:

Whether the drop down field value is set to Yes or No, the validators always come back false and fire off the indicated failure messaging.

What am I doing wrong?

1 answer

1 accepted

0 votes
Answer accepted
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.
April 21, 2014

cfValues['Quality Control Issue (External)?'].value == 'Yes'

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.
April 21, 2014

If you use the tag addon-com.onresolve.jira.groovy.groovyrunner you will get the right eyes, otherwise it's just pot-luck.

Jason Moerbe April 21, 2014

That did the trick. Thanks!!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events