Issue 15967

Search breaks when choosing publishing country from the filters

15967
Reporter: jbiserkov
Type: Bug
Summary: Search breaks when choosing publishing country from the filters
Priority: Blocker
Resolution: Fixed
Status: Resolved
Created: 2014-06-18 10:06:44.292
Updated: 2014-06-18 12:24:35.689
Resolved: 2014-06-18 12:24:35.666
        
        
Description: http://www.gbif.org/dataset/search?q=+Xanthichthys+greenei&publishing_country=GERMANY

*Reporter*: Jordan Biserkov
*E-mail*: [mailto:development@pensoft.net]]]>
    

Attachment Screenshot_7.png



Author: mdoering@gbif.org
Created: 2014-06-18 11:22:08.896
Updated: 2014-06-18 11:22:08.896
        
Indeed, we use ISO codes now, but the portal UI does still issue full enum names. This works:
http://www.gbif.org/dataset/search?q=+Xanthichthys+greenei&publishing_country=DE
    


Author: jbiserkov
Created: 2014-06-18 11:26:55.429
Updated: 2014-06-18 11:26:55.429
        
It does, yet for some reason the filters on the left show:

PUBLISHING COUNTRY

[x] DE (<1)
[ ] Bulgaria (1)
[ ] Germany (1)
    


Author: mdoering@gbif.org
Created: 2014-06-18 11:46:37.578
Updated: 2014-06-18 11:46:37.578
        
Its not only a portal UI issue, but also a registry API one. Facet values are returned as enum names, not iso codes:

http://api.gbif.org/v0.9/dataset/search?q=+Xanthichthys+greenei&facet=publishing_country
http://api.gbif.org/v0.9/dataset/search?q=+Xanthichthys+greenei&publishing_country=BG
    


Author: mdoering@gbif.org
Comment: This goes back deep into our API model classes, the generic SearchResponse contains facets that serialize as enum names in case of enums. Ill fix this blocking issue by teaching the portal how to deal with country enums and create a separate critical issue POR-2206 to fix the registry facet response.
Created: 2014-06-18 11:58:53.794
Updated: 2014-06-18 12:01:04.779


Author: mdoering@gbif.org
Created: 2014-06-18 12:24:35.687
Updated: 2014-06-18 12:24:35.687
        
Portal fixed to work with country enum names:
https://github.com/gbif/portal-web/commit/50fd5d145bfcefdad8270185e6378df17bfe9f44

Proper API change to make returned facets ISO codes left open as issue POR-2206