SpeciesFileGroup / taxonworks

Workbench for biodiversity informatics.
http://taxonworks.org
MIT License
87 stars 27 forks source link

[Bug]: Filter CO-data attribute search function not working #3903

Closed AntWeb-org closed 7 months ago

AntWeb-org commented 8 months ago

Steps to reproduce the bug

1. Want to search COs from Mayotte using Data Attributes
2. Scroll down to Data Attributes
3. Under Predicate, type country
4. Add Mayotte
5. Filter
Zero results filtering for any data attribute under Predicate
...

Screenshot

image

image

Expected behavior

When I filter collection objects using data attributes, I would expect results similar to those in the CE filter.

Filtering data attributes work in the CE filter but it is an extra step to then filter the CEs to COs.

Additional Screenshots

No response

Environment

Production

Sandbox Used

No response

Version

v0.40.0

Browser Used

Chrome Version 123.0.6312.86

mjy commented 8 months ago

I can't replicate this.

mjy commented 8 months ago

My data are not the same as production (I've been messing with it offline), but see:

Screenshot 2024-04-02 at 3 58 38 PM
AntWeb-org commented 8 months ago

Those are filter results for the CE records I believe. The CO filter is not returning results.

mjy commented 8 months ago

Sorry! I need to read more carefully. Will check it out.

mjy commented 8 months ago

Oh, I see. The data attributes there are for CollectionObjects, country is a Predicate used on CollectingEvents, so that's why you see nothing here. The DataAttribute search only searches on Predicates used on this object type, not on predicates linked through other object types. You'll have to search on CEs first, then pass that here.

AntWeb-org commented 8 months ago

It would be extremely valuable to have all of the predicates linked to the COs as well so we do not have to do a two-step filter. One of our most used filters would be finding COs for countries. The GA sort of works but our country predicate is more accurate with regards to filtering.

@bpescador

mjy commented 7 months ago

We added a note via the orange ? help to clarify this function of facet. At this time, as we don't plan to extend this functionality further becaused of the conceptual and implementation complexity it would introduce I'm going ot close this.