You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
Next: Root
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
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.