Skip to content

Preferred Taxon/Taxon difference with "Full Name" = 'Any' filtering results incorrectly #5402

Description

@grantfitzsimmons

Describe the bug
In this simple query, when the line Determinations --> Taxon --> Genus --> Full Name --> Any is present alongside the line Determinations --> Preferred Taxon --> Species --> Full Name --> Any, the search that should return a CO does not. It seems that this can be any higher rank in the taxon tree, and all result in no result being shown.

It seems that the mismatch between "Preferred Taxon" and "Taxon" may be causing an issue here.

To Reproduce
Steps to reproduce the behavior:

image
  1. Go to nbm_mnb_2024_11_15 on the test panel
  2. Go to https://nbm-mnb.specifycloud.org/specify/query/46/ (Simple query (Test 2))
  3. Run the query and see that no results are returned
  4. Remove the line Determinations --> Taxon --> Genus --> Full Name --> Any (or switch it to Determinations --> Preferred Taxon --> Genus --> Full Name --> Any)
  5. Run the query and see that 1 result is now returned

Expected behavior
Since Determinations --> Taxon --> Genus --> Full Name --> Any does not add any additional filters, the single result should be returned in any case.

Screenshots
https://github.com/user-attachments/assets/9428dc33-4a90-430a-8577-7a772985396c

Crash Report

If the bug resulted in an error message, please click on "Download Error Message" and attach it here. If there is no error, please follow these instructions to download your System Information.

Please fill out the following information manually:

Reported By
Amanda at NBM

Metadata

Metadata

Assignees

No one assigned

    Labels

    1 - BugIncorrect behavior of the product2 - QueriesIssues that are related to the query builder or queries in general

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions