I am trying to create a JQL scriptrunner custom function. I took the code from the DateCompare.groovy and refactored it to be DateCompareCopy.groovy. The new groovy jql gets scanned successfully from the scripts directory but at the time of using the function, I get the "No signature of method" error.
/rest/issueNav/1/issueTable [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: No signature of method: com.onresolve.jira.groovy.jql.DateCompareCopy.getIssuesForDeterminedProjects() is applicable for argument types: (java.lang.String, com.atlassian.jira.jql.query.QueryCreationContextImpl, org.apache.lucene.search.BooleanQuery, com.sun.proxy.$Proxy3178) values: [project=Test, com.atlassian.jira.jql.query.QueryCreationContextImpl@8bb16004, ...] Possible solutions: getIssuesForDeterminedProjects(java.lang.String, com.atlassian.jira.jql.query.QueryCreationContext, org.apache.lucene.search.Query, com.onresolve.jira.groovy.jql.FilterCollector) groovy.lang.MissingMethodException: No signature of method: com.onresolve.jira.groovy.jql.DateCompareCopy.getIssuesForDeterminedProjects() is applicable for argument types: (java.lang.String, com.atlassian.jira.jql.query.QueryCreationContextImpl, org.apache.lucene.search.BooleanQuery, com.sun.proxy.$Proxy3178) values: [project=Test, com.atlassian.jira.jql.query.QueryCreationContextImpl@8bb16004, ...] Possible solutions: getIssuesForDeterminedProjects(java.lang.String, com.atlassian.jira.jql.query.QueryCreationContext, org.apache.lucene.search.Query, com.onresolve.jira.groovy.jql.FilterCollector)
I have tried implementing the FilterCollector and even using the ProxyFilterCollector but still get that same error.
What can be done to make this work from the scripts folder?
Honestly, I don't remember how I fixed it. I know at some point I was missing the package declaration. Maybe that is what fixed this issue.
package com.onresolve.jira.groovy.jql
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nic Brough (Adaptavist) Hello Nic, I am trying to following this existing example from a jql scriptrunner function but it doesn't work from the JIRA's scripts directory. I have tried to fix it but can't get past it. It might be a groovy thing. I am new to groovy and I've been trying to read about the closures and implementations but still have not been able to get it right.
Can you point me in the right direction for a solution here, please?
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.