obiba / mica2

Mica is a web portal for epidemiological study consortia.
http://www.obiba.org/pages/products/mica/
GNU General Public License v3.0
10 stars 15 forks source link

MK-1201: Criterion combobox shows the Boolean terms twice #2913

Closed ymarcon closed 6 years ago

ymarcon commented 7 years ago

Jira issue originally created by user @kazoompa:

Everything works including the search, the problem is in the criterion combobox where there are '0', '1' (the actual agg keys) and 'yes', 'no' which do not match the keys.

A Boolean field get mapped to LongTerms aggregation and if one can use the associated BooleanFormatter on the server-side, the client can receive the proper key names 'false', 'true' and the UI would look correct.

ymarcon commented 7 years ago

Comment created by @kazoompa:

After some digging we discovered that the cause of the bug is the way an aggregation is searched in a taxonomy. In Mica 1.5.x the aggregation name used to match the name of a vocabulary whereas now the name can be anything. Solution is when searching for an aggregation, match the alias_ attribute with the input aggregation and if there were no _alias attribute fall back to the old lookup, namely, match the vocabulary name.

ymarcon commented 7 years ago

Comment created by @meek0:

Created pull request https://github.com/obiba/mica2/pull/1377.

ymarcon commented 7 years ago

Issue was closed with resolution "Done"