How to get all the values from a nfeed in script runner

i have a nfeed with values being fetched from db. 

Eg for one typical value is //eg :  "Proj Value" = "Track Val - C1E/AA-00185 [C1E/AA-00185]"

So the nfeed custom field has values say about 20.


i need to get a count of all the values and also fetch all these into a variable.

How can i do this.? I am doing this in script runner.

But getting an exception while trying this out. 

i referred this link

Note: The above solution (link) works fine for select list but how can i achieve it for nfeed? i do not want to pass any project nor issue i need to get only the values for the nfeed.


List<QueryLiteral> getValues(QueryCreationContext queryCreationContext, FunctionOperand operand, TerminalClause terminalClause)
         def finalList = new ArrayList<QueryLiteral>();
		 def ArrayList<Options> mylist;		 
		 //gets the customfield
		 CustomField customFieldProjectID = ComponentAccessor.customFieldManager.getCustomFieldObjectByName("Proj Value")
		 ArrayList<Options> optionsProjectIDList = ComponentAccessor.getOptionsManager().getOptions(customFieldProjectID.getConfigurationSchemes().listIterator().next().getOneAndOnlyConfig());
		 log.debug("optionscount" + optionsProjectIDList.size());




1 answer

Are you trying to write a JQL function? The method signature is that of JQL functions...

Anyway, nFeed has a rest and a java api, so you can use that to get the possible values.

Yes Jamie i m writing a JQL function. But i could find the nFeed rest api to fetch the values from it. Could you please post the link or any info about the rest api. Requirement is to retrieve the values from a nfeed and store these values in a variable. There is this option to retrieve the value from Custom Field value $issue.get("CustomField Name") Or $issue.customfield_XXXXX But this would require passing the "issue id" . I do not want to pass any issue id or project id. I just need to retrieve all the values the nfeed field has.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Mar 13, 2019 in Marketplace Apps

Marketplace Spotlight: Marketing apps for Confluence to keep your teams working on the same page


270 views 0 7
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you