Hi!
I am trying to create a validation resolved transition that only allows to change to resolved status if fix version is not empty.
So I tried and wrote the following script in the validator:
import java.util.ArrayList;
import java.util.Collection;
import com.atlassian.jira.issue.Issue;
import com.atlassian.jira.project.version.Version;
import com.opensymphony.workflow.InvalidInputException;
Collection <Version> fixVersions = new ArrayList <Version> ();
Issue issue = issue;
fixVersions = issue.getFixVersions();
if(fixVersions.size() == 0)
invalidInputException = new InvalidInputException("fixVersions","Fix Versions field can not be empty.");
When I excecute it, it shows the following error:
No such property: issue for class: script1541705492828849500869
org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:53)
org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:52)
org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:307)
script1541705492828849500869.run(script1541705492828849500869.groovy:9)
fr.gfi.jira.plugins.runner.quercus.ScriptingManagerImpl.doExecuteScript(ScriptingManagerImpl.java:272)
fr.gfi.jira.plugins.runner.quercus.ScriptingManagerImpl.eval(ScriptingManagerImpl.java:382)
fr.gfi.jira.plugins.runner.rest.PHPRunnerRest.run(PHPRunnerRest.java:20
Why is showing the error "No such property: issue for class"?
I appreciate your help.
thanks in advance.
Ro
PS: I am using Jira Server and I have installed Code Runner Groovy. I do not have Script Runner or any payed suit, because the company doesn't want to spend money in components
the docs for Code Runner by Haithem souala show examples using $issue
is that the plugin you are using?
it could be just
Collect<Version> fixVersions = $issue.getFixVersions();
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.