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.