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 with a drop down list based on query (Allow multiple values with quotation mark) not adding quotation mark correctly #4184

Closed
myonlylonely opened this issue Sep 25, 2019 · 4 comments · Fixed by #4186
Assignees

Comments

@myonlylonely
Copy link
Contributor

myonlylonely commented Sep 25, 2019

Issue Summary

Query with a drop down list based on query (Allow multiple values with quotation mark) not adding quotation mark correctly.

Steps to Reproduce

  1. Create a query with a parameter with query based dropdown list.
  2. Select allow multiple values, double quotation mark.
  3. Execute query, when the parameter select only 1 choice and the parameter is text, it didn't add double quotation mark and the query returns an error.

Technical details:

  • Redash Version: 8.0 Beta 2
  • Browser/OS: CentOS 7
  • How did you install Redash: Docker
@ranbena
Copy link
Contributor

ranbena commented Sep 25, 2019

@gabrieldutra is this expected or a bug?

@gabrieldutra
Copy link
Member

gabrieldutra commented Sep 25, 2019

@ranbena it should have the quote mark in any case when you set them.

@myonlylonely I tried it in our netlify preview and it seems to be adding the quotes as expected:

But I did notice a different issue that may be what's going on here: what happens if you remove the value the querie has, run the query, add it back and run the query again?

@myonlylonely
Copy link
Contributor Author

I created a new query "Search Album New Sample" on netlify preview.
image

But when I choose 2 items in the dropdown list, It returns the results.
image

When I delete 2 items to 1 item, It returns the results correctly.
image

For the first time I created a new query with a drop down list based on query (Allow multiple values with quotation mark), it always not adding the quotation mark, and it returns an error.

@gabrieldutra
Copy link
Member

Thanks @myonlylonely, that's exactly what I was thinking before 👍.

It seems it's having trouble to handle empty values (for Multiple values it should allow you to leave it empty). I'll take a deeper look into it today and submit a fix PR, but a workaround for you to have this working is to save the query right after you have it working as it should.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants