Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Cannot find matching method java.lang.object#setfieldvalue(java.lang.string,java.lang.string,java.la

Subhaa KEERTHIVASAN
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 9, 2019

Hi, I'm writing a script get ladp nfeed custom field value and update the value.
getting this error
"[static type checking] - Cannot find matching method java.lang.object#setfieldvalue(java.lang.string,java.lang.string,java.lang.string).Please chekc if the declared type is right and if the method exists."

Here is my script :

IFieldValueService.setFieldValues("IITT-5618", "customfield_16730", tab[3]);

 

Code :

import com.valiantys.nfeed.api.IFieldDisplayService;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;
import com.atlassian.jira.component.ComponentAccessor;
import java.lang.String;

@WithPlugin("com.valiantys.jira.plugins.SQLFeed")
@PluginModule
IFieldDisplayService fieldDisplayService;
def customFieldManager = ComponentAccessor.getCustomFieldManager();
def pluginAccessor = ComponentAccessor.getPluginAccessor();
def plugin = pluginAccessor.getPlugin("com.valiantys.jira.plugins.SQLFeed");
def setFieldValues = plugin.getClassLoader().loadClass("com.valiantys.nfeed.api.IFieldValueService");
def IFieldValueService = ComponentAccessor.getOSGiComponentInstanceOfType(setFieldValues);
String displayValue = "";
String issueKey = "IITT-5618";
String geositeNfeedId = "customfield_16730";
String tab=[""];
Object displayResult = fieldDisplayService.getDisplayResult("IITT-5618", "customfield_16730");
if (displayResult != null) {
displayValue = displayResult.getDisplay();
tab = displayValue.split(",OU=");
}
IFieldValueService.setFieldValues("IITT-5618", "customfield_16730", tab[3]);
return;

 

I have already checked the atlassian answers and tried a few changes but did not find a solution.

Any help is appreciated.

 

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events