-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Summary "by hour of day" sometimes includes the current day date in the hour groupings #14124
Labels
Administration/Table Metadata
Customization/Formatting
Priority:P3
Cosmetic bugs, minor bugs with a clear workaround
.Reproduced
Issues reproduced in test (usually Cypress)
Type:Bug
Product defects
Visualization/
Projects
Milestone
Comments
flamber
added
.Correctness
Administration/Table Metadata
Priority:P3
Cosmetic bugs, minor bugs with a clear workaround
Visualization/
and removed
.Needs Triage
labels
Dec 18, 2020
Fixed in 0.39.0, but still shows AM/PM for 24h setting set globally, which is likely the same problem as #11398 |
howonlee
added a commit
that referenced
this issue
Jun 16, 2021
This was referenced Jan 25, 2023
This was referenced Feb 7, 2023
This was referenced Mar 12, 2023
This was referenced Feb 6, 2024
Open
This was referenced Feb 13, 2024
This was referenced Feb 29, 2024
This was referenced Apr 4, 2024
Merged
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Administration/Table Metadata
Customization/Formatting
Priority:P3
Cosmetic bugs, minor bugs with a clear workaround
.Reproduced
Issues reproduced in test (usually Cypress)
Type:Bug
Product defects
Visualization/
Describe the bug
Aggregate and grouping "by hour of day" will sometimes include the current days date in the groupings. This seems to depend on the Metabase Data Model type setting for that datetime field.
If you've selected "No special type" in the data model for that datetime then you get the current date in the groupings. If you select any of the available "Date and Time" types then it works correctly and only gives the hour in the groupings.
Logs
When I see this error (dates in the hour of day I don't get anything in the javascript console.
When I group by hour of day and don't see this issue I get this in the javascript console each time I refresh:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The date should not be displayed in the groupings.
Screenshots
As a Date and Time type, all looks ok (not so sure about that 24:00 though?)
As a "No special type" the error is presented
Information about your Metabase Installation:
Severity
Frustrating, confusing, and inconsistent. Users don't understand why they're seeing a date part when they asked for hours of the day. Not the end of the world but it doesn't just work out of the box.
I couldn't find a way around this via formatting the output, the only way was to change the type in the data model which most users cannot do.
Additional context
Part of the problem may be that there is not a "Date and time" type in the Metabase data model for general datetimes. For instance we have many datetimes that are the time of an "event". It's not a start, join, create, cancelation, delete so it doesn't fit any of those narrow categories. But I do want to be able to do things like group by hour of day.
If either there was a default datetime type available, or "No special type" fields that happen to be datetimes get treated the same as the specific types that would probably be sufficient.
The text was updated successfully, but these errors were encountered: