problems with cfValues script

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

This widget could not be displayed.

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

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

That did the trick. Thanks!!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

131 views 0 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you