Hello guys,
I'm having problems with defining values using Database picker type fields.
I created a connection with the database and performed the definition of the list as well as its visualization for each user, however, every time my user needs to edit the field it returns the following error: "Error searching: groovy.lang.MissingMethodException: No signature of method: Script1159$_run_closure1.call() is applicable for argument types: (String, com.atlassian.jira.issue.IssueImpl, ArrayList) values: [, TREINO-2308, [4097]] Possible solutions: any(), any(), find(), grep(), collect(), dump()"
Has anyone had an error similar to this one and can help me?
Attached, I leave the scripts that are behind the field and the behavior that is occurring inside the issues.
Error:
Error searching: groovy.lang.MissingMethodException: No signature of method: Script1163$_run_closure1.call() is applicable for argument types: (String, com.atlassian.jira.issue.IssueImpl, ArrayList) values: [, TREINO-2308, [4097]] Possible solutions: any(), any(), find(), grep(), collect(), dump()
groovy.lang.MissingMethodException: No signature of method: Script1163$_run_closure1.call() is applicable for argument types: (String, com.atlassian.jira.issue.IssueImpl, ArrayList) values: [, TREINO-2308, [4097]]
Possible solutions: any(), any(), find(), grep(), collect(), dump()
at com.onresolve.scriptrunner.canned.jira.fields.editable.picker.AbstractGenericPicker.executeOverridable(AbstractGenericPicker.groovy:241)
at com.onresolve.scriptrunner.canned.jira.fields.editable.picker.AbstractGenericPicker.executeOverridable(AbstractGenericPicker.groovy)
at com.onresolve.scriptrunner.canned.jira.fields.editable.database.DatabasePickerImpl.getSearchSql(DatabasePickerImpl.groovy:280)
at com.onresolve.scriptrunner.canned.jira.fields.editable.database.DatabasePickerImpl$_getSearchResponse_closure1.doCall(DatabasePickerImpl.groovy:114)
at com.onresolve.scriptrunner.db.AbstractDbConnectionManager.withSql(AbstractDbConnectionManager.groovy:69)
at com.onresolve.scriptrunner.db.AbstractDbConnectionManager$withSql.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.db.AbstractDbConnectionManager$withSql.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.db.AbstractDbConnectionManager.withSql(AbstractDbConnectionManager.groovy:85)
at com.onresolve.scriptrunner.db.DbConnectionManager$withSql.call(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.fields.editable.database.DatabasePickerImpl.getSearchResponse(DatabasePickerImpl.groovy:112)
at com.onresolve.scriptrunner.canned.jira.fields.editable.database.DatabasePickerImpl$getSearchResponse$1.callCurrent(Unknown Source)
at com.onresolve.scriptrunner.canned.jira.fields.editable.picker.AbstractGenericPicker.getSearchResponse(AbstractGenericPicker.groovy:147)
Going through the error log you shared, the error may be coming from the Configuration Script.
Could you please try to comment out or remove the configuration script and see if the error persists?
Thank you and Kind regards,
Ram
Hi @Ram Kumar Aravindakshan _Adaptavist_ ,
In fact, when I remove this configuration script the field returns.
I created this script because the list that comes from the Database is very large and we need to be able to search within this field, this was the way I managed to correct the search, but the editing stopped working. Is it possible to search this field without breaking the edit?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Could you try to make a small change to the Search SQL Query and include an Offset, e.g.
select jira_func_id, jira_menu
from jira_functionalidades
where lower(jira_projecto) ilike lower(?) || '%as3%'
LIMIT 5 OFFSET 6;
If it is for MySQL, something like:-
select jira_func_id, jira_menu
from jira_functionalidades
where lower(jira_projecto) ilike lower(?) || '%as3%'
LIMIT 5;
and see if it can limit the number of results.
I hope this helps to answer your question. :-)
Thank you and Kind regards,
Ram
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Ram Kumar Aravindakshan _Adaptavist_ I think the real solution was not covered.
I'm having the same issue and in my case I cannot avoid using the customized getSearchSql since I need to fetch values from another custom field to use in the query.
Is this mapped as a bug to be fixed already?
Apparently what is happening is that when editing Issues, the Database Picker is sending to the getSearchSql method, the third parameter (original value) as a List, not a String as it was supposed to it.
As seen in the logs:
com.onresolve.scriptrunner.runner.rest.jira.error.GenericPickerException: groovy.lang.MissingMethodException: No signature of method: Script578$_run_closure1.call() is applicable for argument types: (String, com.atlassian.jira.issue.IssueImpl, ArrayList) values: [, XXX-1150, [1234, 4321, ...]] Possible solutions: any(), any(), dump(), grep(), collect(), find()
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.