Groovy "No signature of method" error

Deleted user September 19, 2018

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?

2 answers

0 votes
vovkakibe November 11, 2019

@[deleted]  Are you solve your problem?

Deleted user November 12, 2019

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
0 votes
Deleted user September 20, 2018

@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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events