It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

1 vote
Answer accepted

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
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Expose your beautifully crafted Dashboard through the Jira Service Desk Customer Portal

  A picture is worth a thousand words, especially when you're trying to find relationships and understand your data. Here, Dashboards play a vital role in gaining insights from a variety of dat...

352 views 5 4
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you