chop-dbhi / cilantro

Official client for Harvest (http://harvest.research.chop.edu)
http://cilantro.harvest.io
Other
28 stars 8 forks source link

Unique value count may be larger than number of values shown for Lexicon fields #750

Open murphyke opened 9 years ago

murphyke commented 9 years ago

It appears that the "unique values" count for a Lexicon field is based on the number of values in the lexicon table itself, so if the referencing field doesn't contain all of the possible values, the user may think something is broken if, for example, five values are shown but the "unique values" count claims eight values.

bruth commented 9 years ago

I presume you are referring to the infobar control?

murphyke commented 9 years ago

The infobar and (I believe) the search control behave this way. Those are the only ones that I checked.

bruth commented 9 years ago

Hmm, this should not be the case. The count method is passed the tree-based queryset so it should not include non-related values. Do running the bare instance.count method in the shell and passing in the tree-based queryset?

murphyke commented 9 years ago

Will check later today; thanks.