Hello
I have zero experience in groovy expressions and I am trying to use JIRA Misc Workflow extensions to transition a linked issue based on a certain condition. I would like to ensure this post function cannot be completed unless a custom field has a certain value in it.
I have tried:
if(issue.get("customfield_10900") = 2) {
return true;
} else {
return false;
}
and I get the error message -
startup failed: Script1.groovy: 1: expecting ')', found '=' @ line 1, column 35. if(issue.get("customfield_10900") = 2) { ^ 1 error
It seems that you have tried to perform an illegal workflow operation.
If you think this message is wrong, please contact your JIRA administrators.
If I change it to:
if(issue.get("customfield_10900") >= 2) {
return true;
} else {
return false;
}
It may be worth mentioning that the Custom Field is a number field, I am unsure if that makes much difference.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.