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

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
Community showcase
Posted yesterday in Agile

What is Scrum? A good, bad, and ugly answer.

In a world of dark-scrum, faux-scrum, and scrum-butt, the question still remains: What is scrum and how do you do it “right?” That’s the question we set out to answer. I'm Max, I've been teaching c...

65 views 0 2
Join discussion

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