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 Questions using dashboard date filters broken on 0.31.2 #9090

Closed
bcbob opened this issue Dec 9, 2018 · 20 comments · Fixed by #9679
Closed

Query Builder Questions using dashboard date filters broken on 0.31.2 #9090

bcbob opened this issue Dec 9, 2018 · 20 comments · Fixed by #9679
Assignees
Labels
Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. Reporting/Dashboards Type:Bug Product defects
Milestone

Comments

@bcbob
Copy link

bcbob commented Dec 9, 2018

Dashboard date filters on single dates do not work for question builder questions.

For example, using the sample dataset create a simple GUI raw data question on the ORDERS table.
Then add it to a dashboard and setup a single date filter.

Try filtering for orders on 11 Feb 2019.
No results will appear unless you filter for orders BETWEEN 11 Feb 2019 and 11 Feb 2019.

This is the simplest example of an issue that has broken many of the dashboards we use.

Does anyone else have broken dashboards using single date filters on question builder questions? I ask because it would seem this simple issue has been missed since 0.31.0, when it first cropped up. Up until that point, our dashboards worked fine.

screen shot 2018-11-25 at 4 22 54 pm

screen shot 2018-11-25 at 4 27 16 pm

screen shot 2018-11-25 at 4 27 57 pm

Originally posted by @bcbob in #8932 (comment)

@bcbob bcbob changed the title Query Builder Questions broken with dashboard filters on 0.31.2 Query Builder Question broken with dashboard date filters on 0.31.2 Dec 9, 2018
@bcbob bcbob changed the title Query Builder Question broken with dashboard date filters on 0.31.2 Query Builder Questions using dashboard date filters broken on 0.31.2 Dec 9, 2018
@lukecarazzo
Copy link

@bcbob I am also still having the same issues. I am still on Version 0.30.4 where the date filters work fine. I have had to test each version that has been released and had to revert back to 0.30.4 as each release has the bug.

@lukecarazzo
Copy link

I really hope that this issue gets resolved in the new release so that I can get all the upgrades in the newer versions.

@bcbob
Copy link
Author

bcbob commented Dec 13, 2018

@lukecarazzo I'm pleased to know I'm not the only one. It almost seems that way 😐 I expected date filters on dashboards to be a core feature and that almost all users would be affected by this? But you and I seem to be all alone in the user base...?

@anandabudi
Copy link

Guys, you're not alone.. I also have the same problem with date filters + Google BigQuery with the latest Metabase 😐

@bcbob
Copy link
Author

bcbob commented Dec 14, 2018

Please give the overall issue a thumbs up to bump it up the dev team priority list if you also have broken dashboards! They have a lot on their plates ... this is kind of mission critical for everyone with existing dashboards in use wanting to upgrade to 0.31.x!

@mazameli
Copy link
Contributor

Okay, I've reproduced the issue with Single Date filters on dashboards using the sample dataset's Orders table. If you choose a date that should produce results for a card on the dashboard, it instead displays an error on screen, and the logs show the below error. I'm also seeing this error when using the "All Options" widget, but only when using the On operator (i.e. a specific single date).

These errors appear to be limited to dashboard filters only; query builder single date filters appear to work just fine.

I was also able to reproduce this with a BigQuery question on a dashboard with the Single Date filter and the All Options filter widget when using the On operator.

For the others who have run into issues, are your issues with all dashboard Time filters, or only the Single Date and On operator of the All Options filter widget?

Dec 14 18:08:30 WARN metabase.query-processor :: Query failure: Must be a valid instance of one of these clauses: :and, :or, :not, :=, :!=, :<, :>, :<=, :>=, :between, :starts-with, :ends-with, :contains, :does-not-contain, :inside, :is-null, :not-null, :time-interval, :segment
("clojure.core$ex_info.invokeStatic(core.clj:4739)"
"clojure.core$ex_info.invoke(core.clj:4739)"
"--> query_processor$assert_query_status_successful.invokeStatic(query_processor.clj:285)"
"query_processor$assert_query_status_successful.invoke(query_processor.clj:277)"
"query_processor$run_and_save_query_BANG_.invokeStatic(query_processor.clj:323)"
"query_processor$run_and_save_query_BANG_.invoke(query_processor.clj:316)"
"query_processor$fn__38063$process_query_and_save_execution_BANG___38068$fn__38069.invoke(query_processor.clj:354)"
"query_processor$fn__38063$process_query_and_save_execution_BANG___38068.invoke(query_processor.clj:340)"
"api.card$run_query_for_card.invokeStatic(card.clj:580)"
"api.card$run_query_for_card.doInvoke(card.clj:566)"
"api.card$fn__42772$fn__42775.invoke(card.clj:587)"
"api.card$fn__42772.invokeStatic(card.clj:586)"
"api.card$fn__42772.invoke(card.clj:582)"
"middleware$enforce_authentication$fn__55960.invoke(middleware.clj:113)"
"api.routes$fn__56106.invokeStatic(routes.clj:62)"
"api.routes$fn__56106.invoke(routes.clj:62)"
"routes$fn__56195$fn__56196.doInvoke(routes.clj:108)"
"routes$fn__56195.invokeStatic(routes.clj:103)"
"routes$fn__56195.invoke(routes.clj:103)"
"middleware$catch_api_exceptions$fn__56095.invoke(middleware.clj:436)"
"middleware$log_api_call$fn__56073$fn__56075.invoke(middleware.clj:364)"
"middleware$log_api_call$fn__56073.invoke(middleware.clj:363)"
"middleware$add_security_headers$fn__56015.invoke(middleware.clj:252)"
"core$wrap_streamed_json_response$fn__56896.invoke(core.clj:67)"
"middleware$bind_current_user$fn__55965.invoke(middleware.clj:137)"
"middleware$maybe_set_site_url$fn__56025.invoke(middleware.clj:290)"
"middleware$add_content_type$fn__56018.invoke(middleware.clj:262)")

@mazameli mazameli added Type:Bug Product defects Reporting/Dashboards Querying/Parameters & Variables Filter widgets, field filters, variables etc. labels Dec 14, 2018
@lukecarazzo
Copy link

@mazameli

I am having the issues on all date filters on my dashboards. Any type of date filter doesn't work and gives an error. I am having issues for single date, between dates month/year an so forth. if I roll back to 0.30.4 then all date filters on dashboards work just fine.

@bcbob
Copy link
Author

bcbob commented Dec 18, 2018

@mazameli
I've noticed the error only for single date filters (ON a specific date).
Clicking through to the underlying question works, and the correct results are displayed.
Using BETWEEN on a single date fixes the problem (but i have other native query cards on my dashboards that require single date input).

@mazameli
Copy link
Contributor

Okay, interesting. Both of you are querying against mysql if I'm not mistaken, but @lukecarazzo is running it on Windows Server. And to reiterate, all these problems appear to be specific to dashboard Date/time filters.

@camsaul Any ideas on this?

@bcbob
Copy link
Author

bcbob commented Jan 5, 2019

Yes, I'm querying mysql, and yes it's specific to DASHBOARD date/time filters. Clicking through from the dashboard to the underlying question builder question works fine - the dashboard parameter is passed to the question and it runs properly.
I just have a bunch of semi functional dashboards ... and am surprised more other users don't too?
I was assuming this was a very small bug somehow introduced into the 0.31.x update...

@jlisyc
Copy link

jlisyc commented Jan 15, 2019

Also bug in 0.31.2 #9267

@vincentsjtu
Copy link

same problem. we i added single day filter to my dashboard, all related questions broke out with"There was a problem displaying this chart."

@bcbob
Copy link
Author

bcbob commented Apr 1, 2019

Have installed 0.32.1 and problem is still there.
Finally going to re-do all our dashboards.
Still very confused why this bug doesn't seem to affect anyone else and persists?
The way we use metabase it is absolutely fundamental!

@lukecarazzo
Copy link

@bcbob

I am also waiting for a fix. I've got many questions and dashboards that are affected. I thought that they were on this issue but it seems that nothing has come from it.

@salsakran salsakran added the Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness label Apr 1, 2019
@salsakran salsakran added this to the 0.32.1 milestone Apr 1, 2019
@flamber
Copy link
Contributor

flamber commented Apr 1, 2019

@salsakran I think you added the wrong milestone - it should be 0.33.0 or a new 0.32.2

@salsakran salsakran modified the milestones: 0.32.1, 0.32.2 Apr 1, 2019
@camsaul
Copy link
Member

camsaul commented Apr 2, 2019

@salsakran this isn't a 0.32.x regression -- this was first an issue in 0.31.0. Not saying it shouldn't be fixed, but is there a specific reason you added it to 0.32.2?

@salsakran
Copy link
Contributor

@camsaul mainly because it is a super common use case that impacts a large fraction of our install base.

Date filters on dashboards are extremely common, and for them to be broken for GUI cards is a problem. If it's all GUI cards, I'd say this is a P0, if it's only a small subset it's P2.

@camsaul
Copy link
Member

camsaul commented Apr 2, 2019

Related (fixed in 0.32.0): #9127

@bcbob
Copy link
Author

bcbob commented Apr 9, 2019

Thank you very much for resolving this issue 🌈🏆❤️✅0.32.3

@lukecarazzo
Copy link

Oh Yay!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority:P1 Security holes w/o exploit, crashing, setup/upgrade, login, broken common features, correctness Querying/Parameters & Variables Filter widgets, field filters, variables etc. Reporting/Dashboards Type:Bug Product defects
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants