How to get nFeed custom field display value in Groovy (ScriptRunner)

Only available from ScriptRunner 3 and higher

Here is an example of a Scripted field getting the display result of a nFeed custom field (customfield_10101) on issue TEST-1

ScriptRunner example
import com.valiantys.nfeed.api.IFieldDisplayService;
import com.onresolve.scriptrunner.runner.customisers.PluginModule;
import com.onresolve.scriptrunner.runner.customisers.WithPlugin;

IFieldDisplayService fieldDisplayService;

String displayValue = "";
Object displayResult = fieldDisplayService.getDisplayResult("TEST-1", "customfield_10101");
if (displayResult != null) {
	displayValue = displayResult.getDisplay();
return displayValue;

▶ See it in action: How to add nFeed field value into issue Summary ◀