dronefly-garden / dronefly

Red Discord Bot V3 cogs for naturalists.
Other
16 stars 3 forks source link

taxon: rank used with `in` should not be order-dependent #137

Closed synrg closed 3 years ago

synrg commented 3 years ago

The natural way to express rank filter terms when used with an in filter is:

,tab duck hybrid in ducks

but this yields:

Sorry No matching taxon found

This works, but is counter-intuitive:

,tab duck in ducks hybrid

Observations of Anas superciliosa × platyrhynchos (Pacific Black Duck × Mallard hybrid) (Gray Duck × Mallard)

That is, it matches a taxon with "duck" in the name that is a hybrid that is in the taxon with "ducks" in the name, and not a taxon with "duck" in the name that is in a taxon with "ducks" in the name that is a hybrid.

synrg commented 3 years ago

Never mind that ,tab should probably apply the hybrid term as an observation filter, not a taxon filter. I'll file a separate issue about that. This issue equally affects taxon searches with the ,taxon command, e.g. ,t duck in ducks hybrid is the only way to make it work. The intuitive order ,t duck hybrid in ducks does not work!

synrg commented 3 years ago

Fixed in 67b9d0a9d803e91cf96273d3310fe4cea7355dcf