Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query builder crashes when querying unmapped field #3311

Closed
carlosmbe opened this issue Apr 5, 2023 · 9 comments
Closed

Query builder crashes when querying unmapped field #3311

carlosmbe opened this issue Apr 5, 2023 · 9 comments
Labels
1 - Bug Incorrect behavior of the product 2 - Statistics Issues that are related to the statistics page

Comments

@carlosmbe
Copy link
Contributor

Describe the bug
If you try to hit count while one of the fields is unmapped. An error occurs. Moreover, the stats page is no longer viewable and needs to be refreshed.

To Reproduce
Steps to reproduce the behavior:
Note: This can be done in any collection.

  1. Log in as petrifiedroadkill in NHMD Test Database.
  2. Go to NHDM Amber -> Statistics.
  3. Go to any category and pick a field.
  4. Un map any value and press count.
  5. See Error

Expected behavior
An alert dialog saying this is not allowed or returning to the main stats page.

Screen Recording and Crash Report

Screen.Recording.2023-04-05.at.4.31.42.PM.mov

Specify 7 Crash Report - 2023-04-05T21_31_58.526Z (1).txt

Desktop:

OS: Mac OSx Ventura
Browser: Chrome
Specify 7 Version: statspage branch
Database Name:
NHMD Test

Reported By
Carlos @carlosmbe

@carlosmbe carlosmbe added 1 - Bug Incorrect behavior of the product pri:unknown labels Apr 5, 2023
@carlosmbe carlosmbe changed the title Stats Page Error(Crash?) When Attempting To Count With Unmapped Fields Stats Page Error(Crash?) When Attempting To Count or Query With Unmapped Fields Apr 6, 2023
@carlosmbe
Copy link
Contributor Author

carlosmbe commented Apr 6, 2023

Update: Same error happens when query in stats with an unmapped item.

Can only happen if you have more than one item. At least one needs to be un mapped. Otherwise if it only a single unmapped item you are not allowed to Count/Query

These two will cause the error
Screenshot 2023-04-06 at 2 54 39 PM
Screenshot 2023-04-06 at 2 53 13 PM

This will Not Cause Error
Screenshot 2023-04-06 at 2 54 49 PM

Specify 7 Crash Report - 2023-04-06T19_50_20.480Z.txt

@grantfitzsimmons
Copy link
Member

This is a standard query builder bug, not specifically related to stats page from what I can tell.

@grantfitzsimmons
Copy link
Member

S7 BUG: Crash when query has "NOT MAPPED" taxon

Confirmed in v7.8.5 and v7.8.10

Shown in the images below is a CO query that has "Determinations" > "Taxon" > "Species" > "NOT MAPPED".

Querying results in the error shown.

v7.8.5
image
image

v7.8.10
image
image

Reported By: Matthew Cruz at UMich

@grantfitzsimmons grantfitzsimmons changed the title Stats Page Error(Crash?) When Attempting To Count or Query With Unmapped Fields Query builder crashes when querying unmapped field May 2, 2023
@github-project-automation github-project-automation bot moved this to 📋 Backlog in Front-End Backlog May 2, 2023
@maxpatiiuk
Copy link
Member

Fixed on the use-dynamic-ranks branch and the specify-network-integration branch. Can anyone test it on them?

@carlosmbe
Copy link
Contributor Author

carlosmbe commented Jun 16, 2023

@maxpatiiuk Error Still Present on use-dynamic-ranks. specify-network-integration Fixes this issue

Specify 7 Crash Report - 2023-06-16T21_41_35.307Z (1).txt
Specify 7 Crash Report - 2023-06-16T21_41_35.307Z.txt
Screenshot 2023-06-16 at 4 41 33 PM

@maxpatiiuk
Copy link
Member

Does this happen on production? Because specify-network-integration branch is merged into production.
If this is fixed on production the issue can be closed

@grantfitzsimmons
Copy link
Member

@carlosmbe Can you try this again on production soon and close this issue if it has been resolved?

@grantfitzsimmons grantfitzsimmons added the 2 - Statistics Issues that are related to the statistics page label Aug 7, 2023
@carlosmbe carlosmbe removed their assignment Oct 9, 2023
@carlosmbe
Copy link
Contributor Author

Note to self and future testers curious if this issue should be closed.
Until this Query in NHMD Test can run or be added to Stats Page without an issue, I'd keep it open.
https://nhmdtest030823-v79.test.specifysystems.org/specify/query/405/

Screen.Recording.2023-11-15.at.11.57.37.PM.mov

Specify 7 Crash Report - 2023-11-16T05_57_56.569Z.txt

Screen.Recording.2023-11-15.at.11.58.07.PM.mov

@emenslin
Copy link
Collaborator

emenslin commented Jul 17, 2024

Closing in favor of #3340. You can unmap parts of a query in stats and there is no error and if you try to query with the Not Mapped Query mentioned it throws the same error that is seen in #3340. Original query no longer exists so I had to recreate it so something could've gone wrong there however since it appears to be the same I am closing this.

@emenslin emenslin closed this as not planned Won't fix, can't repro, duplicate, stale Jul 17, 2024
@github-project-automation github-project-automation bot moved this from 📋 Backlog to ✅ Done in Front-End Backlog Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 - Bug Incorrect behavior of the product 2 - Statistics Issues that are related to the statistics page
Projects
Status: Done
Development

No branches or pull requests

5 participants