any ideas how to correct this:
/rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [c.o.jira.behaviours.GroovyScriptLoader] Class or file does not exist at this location /rest/com.onresolve.jira.plugin.Behaviours/1.0/behaviours/runvalidator.json [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Class or file does not exist at this location java.lang.Exception: Class or file does not exist at this location
This is the script it is occuring from:
import com.atlassian.jira.issue.Issue import com.opensymphony.workflow.InvalidInputException import com.atlassian.jira.component.ComponentAccessor def cfm = ComponentAccessor.getCustomFieldManager() Issue myIssue = issue def verFixedField = cfm.getCustomFieldObject("customfield_19712") // Version Fixed field def verifySteps def steps def selVer = myIssue.getCustomFieldValue(verFixedField) if (myIssue.IssueType != 'Story' && myIssue.IssueType != 'Story-task') { verifySteps = cfm.getCustomFieldObject("customfield_19511") // Steps to Verify field steps = myIssue.getCustomFieldValue(verifySteps) } def rtrnResult = true def verChk = false if (selVer ==~ /^\[\d{1,3}\.\d{1,2}\.\d{1,2}\.\d{1,3}\]$/) { verChk = true } if (myIssue.IssueType != 'Story' && myIssue.IssueType != 'Story-task') { if ((myIssue.getResolution() == "Fixed") && ((verChk == false) || (steps == null))) { rtrnResult = false } } else { if ((myIssue.getResolution() == "Fixed") && ((verChk == false))) { rtrnResult = false } } return rtrnResult
Hi J Starbird,
When you say a worfklow validator you mean something like Validators right ?
The error message you get look like you are trying to do something with a Behaviour.
I can also see in your script
// this will fail myIssue.IssueType //this is the right way myIssue.issueType.name
Also a validator, when you want from it to fail, have to return
throw new InvalidInputException("fixVersions", "Fix Version/s is required when specifying Resolution of 'Fixed'")
regards, Thanos
Thank you.
The error actually went away after I upgraded to the latest version of the plugin.
I will make the changes you mentioned though.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.