BioKIC / Symbiota

The Symbiota Virtual Flora/Fauna project develops on-line tools to aid the generation, exploration and management of biodiversity data (collection specimens, observations, images, checklists, keys, etc.). See also: http://bdj.pensoft.net/articles.php?id=1114 and https://symbiota.org/. For documentation, please visit https://symbiota.org/docs
GNU General Public License v2.0
38 stars 52 forks source link

[bug] Synonyms checkbox does not work as expected for genera #1873

Open themerekat opened 1 week ago

themerekat commented 1 week ago

Synonyms (i.e., names that don't match the exact name being searched, but are linked to one another in the taxonomic thesaurus) are returned regardless of whether the checkbox is checked.

It seems that the problem might be that the unchecking is not being passed to the cookies (or whatever the terminology is), because when you go back to Search Criteria, the box is automatically checked, no matter if you checked it before or not.

Happening in CCH2, which is currently on 3.1.4

themerekat commented 5 days ago

After further research, @NikitaSalikov and I determined that the checkbox is working properly for species. However, we found a new bug that it doesn't work for genera: if you search WITH synonyms, the total out is less than the total count then when you search WITHOUT synonyms!

themerekat commented 5 days ago

What made us think that the synonyms checkbox wasn't working at all was that we were getting results for both Mimulus guttatus and Erythranthe guttata when we were doing a search for Mimulus guttatus in CCH2. However, the real problem was that:

  1. Some specimens used to be named Mimulus guttatus.
  2. Those specimens were annotated (i.e., they got a new determination) to something similar to Erythranthe guttata, but actually a misspelling of this name (e.g., Erythranthe gutttata).
  3. The tidInterpreted in omoccurrences was NOT updated accordingly with the new name from the determination (which should be NULL, since the new determination's scientific name cannot be found in the taxonomic thesaurus).

If tidInterpreted of the newly-appointed determination does not exist, the new tidInterpreted should be NULL.

egbot commented 4 days ago

Hold out on fixing this one right now. These searches are more complicated than initially apparent and will require some discussion, and compromises.