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 from QCB doesn't disable Browse in Forms when 0 results returned #3796

Closed
bronwyncombs opened this issue Jul 17, 2023 · 7 comments · Fixed by #3800
Closed

Query builder from QCB doesn't disable Browse in Forms when 0 results returned #3796

bronwyncombs opened this issue Jul 17, 2023 · 7 comments · Fixed by #3800
Assignees
Labels
1 - Bug Incorrect behavior of the product 2 - Queries Issues that are related to the query builder or queries in general
Milestone

Comments

@bronwyncombs
Copy link

Describe the bug
The query builder dialog that's accessed from a query combo box allows to select Browse in Forms even when 0 results are returned. Upon click an infinite loading dialog begins.

To Reproduce
Steps to reproduce the behavior:

  1. Go to record with query combo box
  2. Click on magnifying glass icon to the right
  3. Click on Query Builder
  4. Run a query that returns no results
  5. Select Browse in Forms
  6. See error

Screenshots

Screen.Recording.2023-07-17.at.11.58.59.AM.mov
Screen.Recording.2023-07-17.at.11.55.35.AM.mov

Desktop:

  • macOS, Chrome, v7.9-dev

Database Name: sdnhmpaleo

@bronwyncombs bronwyncombs added the 1 - Bug Incorrect behavior of the product label Jul 17, 2023
@bronwyncombs
Copy link
Author

Can't recreate in v7.8.13

@bronwyncombs bronwyncombs added the 2 - Queries Issues that are related to the query builder or queries in general label Jul 17, 2023
@grantfitzsimmons grantfitzsimmons added this to the 7.9 milestone Jul 17, 2023
@CarolineDenis CarolineDenis self-assigned this Jul 18, 2023
CarolineDenis added a commit that referenced this issue Jul 18, 2023
@CarolineDenis
Copy link
Contributor

@bronwyncombs I cannot reproduce

@bronwyncombs
Copy link
Author

I'm on herb_rbge and getting this dialog now instead of the loading screen. Still only through the query combo box to query builder path. Also, only with certain fields (first name, not email)?

Screen.Recording.2023-07-18.at.10.44.52.AM.mov

From a UX perspective, I don't see a problem with this "No Data." dialog view. It's probably not necessary to disable Browse in Forms under the conditions it does appear since this is now the case

@grantfitzsimmons
Copy link
Contributor

Screen.Recording.2023-07-18.at.12.39.52.PM.mov

Super inconsistent. Running this same query over and over yielded different results.
https://herbrbge71423-v79-dev.test.specifysystems.org/specify/query/320/

@CarolineDenis
Copy link
Contributor

@grantfitzsimmons, I can add a condition if totalcount is = 0 or we can accept the dialog with no data?

@maxpatiiuk
Copy link
Member

maxpatiiuk commented Jul 19, 2023

Super inconsistent. Running this same query over and over yielded different results.

that button only appears once total count is fetched.

fetching results and fetching total count are separate results - they can be resolved in any order - that is why you see the inconsistency (while total count is fetching, browse in forms is disabled)

@grantfitzsimmons
Copy link
Contributor

grantfitzsimmons commented Jul 19, 2023

@maxpatiiuk

That's Interesting, but I can wait forever and it does not appear if it loads and does not show the browse in forms.
It's not that I am impatient (though I am). You are likely correct, but I don't understand why it "gives up" loading the total count in those cases

@CarolineDenis CarolineDenis linked a pull request Jul 20, 2023 that will close this issue
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 - Queries Issues that are related to the query builder or queries in general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants