-
Notifications
You must be signed in to change notification settings - Fork 14.4k
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
[Explore] New time picker breaks old charts with "x days" in time picker start date #12508
Comments
Thanks @michellethomas for spotting this issue! |
thanks for reporting! |
I think we should at least add an entry in |
I'm thinking maybe we can do some adaptations in superset/superset/utils/date_parser.py Line 135 in 241f380
|
That works too. But I do find the previous behavior too ambiguous and somewhat confusing so would appreciate it if we can properly deprecate it. Maybe even throw an error message when "x periods" are used without the look back/forward descriptors. |
This is a good point. When we detect the user time range value is "X [dateunit]" then respond to an error message. |
Expected results
In 0.38 and earlier, if you set "30 days" or "5 months" in start date (without "ago", "before", or "last"), it will be automatically converted to the equivalent of "30 days ago". The new time picker will treat it as "30 days after today", causing an
Unexpected time range: From date cannot be larger than to date
error for some existing charts.Here are examples of time ranges that will break in the new time picker but are valid for the old one:
Actual results
Existing charts with "x periods" set in start date should behave the same.
Since the original behavior is a little bit ambiguous, we may actually want to force users to use "30 days ago" or "- 30 days" for this use case. So I think it's OK to keep current logic, but to minimize disruption, we should do a db migration to automatically fix such charts and add a breaking change warning in the
v1.0
changelog (albeit numbers users who used this syntax is low).Environment
Latest master
The text was updated successfully, but these errors were encountered: