← Back to team overview

dhis2-devs team mailing list archive

Re: Optionset api not returning the name and code v2.26

 

Hi Morten,
Do you mean the comments dialog in data entry is not doing correctly the call to the API? I tested this in 2.25 build c12aa62 and the dropdown is not populated with the options form the option set.

JM

> El 15/06/2017, a las 02:39, Morten Olav Hansen <morten@xxxxxxxxx> escribió:
> 
> Hi Pooben
> 
> Yes, this was changed some time back. Please have a look at our field filter docs [1]. For collections list this, the default field filter is just the id, but you can easily get more by doing `options[:all]` or by being more specific `options[id,displayName]`.
> 
> [1] https://docs.dhis2.org/master/en/developer/html/webapi_metadata_field_filter.html <https://docs.dhis2.org/master/en/developer/html/webapi_metadata_field_filter.html>
> 
> -- 
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org <http://www.dhis2.org/>
> On Thu, Jun 15, 2017 at 2:28 PM, Pooben Dass <pooben@xxxxxxxx <mailto:pooben@xxxxxxxx>> wrote:
> Hi
> 
> We have a dropdown list of comment options linked to the dataelements as option set comments but the drop down populates as undefined.
> 
> Upon checking the api (/api/optionSets/) to confirm what is returned, I see it only returns the id not the other values. 
> 
> this is what is returned in v2.26:
> options: 
> [
> {
> id: "AMrXb7wAiKV"
> },
> {
> id: "yCLGIfdYbQ4"
> },
> 
> 
> this is what is returned in v2.20:
> options: 
> [
> {
> id: "AMrXb7wAiKV",
> name: "#{1} No evidence",
> code: "#{1} No evidence",
> created: "2015-03-09T19:33:15.000+0000",
> lastUpdated: "2015-03-09T19:33:15.000+0000",
> href: "url ...."
> },
> {
> id: "yCLGIfdYbQ4",
> name: "#{2} Evidence not valid/irrelevant",
> code: "#{2} Evidence not valid/irrelevant",
> created: "2015-03-09T19:33:15.000+0000",
> lastUpdated: "2015-03-09T19:33:15.000+0000",
> href: "url ....."
> },
> 
> Is there a script that was neglected in the upgrade process or some other setting that needs to be changed?
> 
> Regards
> Pooben
> 
> This message and any attachments are subject to a disclaimer published at http://www.hisp.org/policies.html#comms_disclaimer <http://www.hisp.org/policies.html#comms_disclaimer>.  Please read the disclaimer before opening any attachment or taking any other action in terms of this electronic transmission.  If you cannot access the disclaimer, kindly send an email to disclaimer@xxxxxxxx <mailto:disclaimer@xxxxxxxx> and a copy will be provided to you. By replying to this e-mail or opening any attachment you agree to be bound by the provisions of the disclaimer.
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs <https://launchpad.net/~dhis2-devs>
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx <mailto:dhis2-devs@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~dhis2-devs <https://launchpad.net/~dhis2-devs>
> More help   : https://help.launchpad.net/ListHelp <https://help.launchpad.net/ListHelp>
> 
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp


Follow ups

References