GSA / data.gov

Main repository for the data.gov service
https://data.gov
Other
594 stars 92 forks source link

Inventory Publisher field should populating values on any string match #3750

Open FuhuXia opened 2 years ago

FuhuXia commented 2 years ago

The way how Publisher field are populated sometime leads to a frustrating user experience. User has to know the exact starting letter(s) of a Publisher value in order to see it as an available selection. For example, a user tries to use "Office of Fossil Energy", entering a keyword "fossil" does not give any available values. User has to do some guessing, or refer to the csv file to get it right.

image

How to reproduce

Add a dataset in Inventory, Choose Department of Energy as Organization, Enter fossil in the Select Publisher field.

Expected behavior

"Office of Fossil Energy" is populated as an available selection.

Actual behavior

Publisher field is empty

Sketch

The auto-complete behavior should match on the typed string appearing anywhere in the publisher value, not just at the beginning.

jbrown-xentity commented 2 years ago

It would involve fixing this backend code: https://github.com/GSA/ckanext-dcat_usmetadata/blob/main/metadata-app/src/api/index.js#L758-L795