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

Fix query based param with no results crashing page #4707

Merged
merged 6 commits into from
Mar 24, 2020

Conversation

gabrieldutra
Copy link
Member

What type of PR is this? (check all applicable)

  • Bug Fix

Description

Change QueryBasedParameter to use lodash functions and avoid crashing the Query Page.

Related Tickets & Documents

Fixes #4703

Mobile & Desktop Screenshots/Recordings (if there are UI changes)

--

@gabrieldutra gabrieldutra self-assigned this Mar 3, 2020
@gabrieldutra
Copy link
Member Author

WDYT about adding a notFoundContent with a message like "No results found" instead of disabling the parameter?

@myonlylonely
Copy link
Contributor

Is this bug fixed in docker image redash/redash:preview?

@arikfr
Copy link
Member

arikfr commented Mar 10, 2020

WDYT about adding a notFoundContent with a message like "No results found" instead of disabling the parameter?

Sounds right. Let's use "No options available".

@arikfr
Copy link
Member

arikfr commented Mar 10, 2020

Is this bug fixed in docker image redash/redash:preview?

No. redash/redash:preview is based on the master branch.

@gabrieldutra
Copy link
Member Author

Sounds right. Let's use "No options available".

Updated for both Dropdown and Query Based Dropdown 👍

@gabrieldutra gabrieldutra requested a review from arikfr March 17, 2020 00:08
@gabrieldutra
Copy link
Member Author

Updates:

  • The 500 errors when a query has no results is now handled to return an empty set
  • Added a Cypress test to make sure it opens the page (not crashing) and shows that message when you click on the Parameter

@arikfr arikfr merged commit 8db1612 into master Mar 24, 2020
@arikfr arikfr deleted the fix-query-based-param-no-results branch March 24, 2020 12:48
@gabrieldutra gabrieldutra mentioned this pull request Apr 2, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

A query with a query based dropdown list parameter with empty results could cause page error
3 participants