nfeed JSON WebService Select List labels

I'm using the nfeed JIRA plugin to get values for a Select List via a simple JSON web service. The data returned from the URL looks like:

[
{"class":"country.list.Country","id":1,"countryCode":"AF","countryName":"AFGHANISTAN"},{"class":"country.list.Country","id":2,"countryCode":"AX","countryName":"ÅLAND"},{"class":"country.list.Country","id":3,"countryCode":"AL","countryName":"ALBANIA"},...
]
I've set the URL to point the JSON service and the Select List gets populated with <options> that all look like the following:
<option value="country.list.Country">country.list.Country</option>
 
If I change the Key setting in nfeed (to 1 or 2) I can change the value attribute in the <option>, but I can't see how I can change the user visibile label on the <option>.
 
I've tried setting the "Rendering for * view" fields to {3} or 3, with and without the native filter option enabled but to no avail.  Nothing I've tried will change the labels in the Select List.  
The "Query for search summary" and other "Query..." options might be relevant but I'm not sure how one would use them to select an entry from a JSON object, and all the examples talk about SQL queries so they're of little help.
Is there something I've missed?
 

1 answer

1 accepted

Accepted Answer
1 vote

Hi Simon,

For the moment the integration with the webservice is quite simple. The "select list" displays the first information provided in the JSON file, in your case "country.list.Country"

To obtain the list of country in the select list your JSON file has to be like this:

[
{"countryName":"AFGHANISTAN","class":"country.list.Country","id":1,"countryCode":"AF"},{"countryName":"ÅLAND","class":"country.list.Country","id":2,"countryCode":"AX"},{"countryName":"ALBANIA","class":"country.list.Country","id":3,"countryCode":"AL"},...
]

The key will be 2

You should apply the "Native filter"

and in the render HTML you can display {0} ({3})

The capability to display in the select list any properties could be great.

You can create an improvement on our JIRA

Regards

Cyrille

Thanks Cyrille, it would be nice to be able to customise. In this case we can change the output order but we have some other services we'd like to use which we'll need to proxy or similar to achieve this :)

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Featured Groups

Tuesday tips & tricks: What is the Atlassian Community?

It's officially Tuesday, which means it's officially time for another tip to help you better navigate this space we call the Atlassian Community. 😄 I got a great question from community member, Sa...

145 views 6 8
View post

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