metabase / metabase/metabase

Date filter picker doesn't take column's temporal unit in mind

Open
#35,375 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

.Frontend Priority:P3 Querying/GUI Querying/Notebook Type:New Feature
Dominant language
Clojure
Stars
49.3k
Forks
6.8k
Avg merge
1d 13h
Merged PRs (30d)
653

Description

Describe the bug

We should take datetime column's temporal unit in mind when filtering. Most date picker options don't make sense (and don't work) when trying to apply them to columns with buckets like "Year" or "X of Year".

To Reproduce

Year

  1. New > Question > Raw Data > Sample Database > Orders
  2. Summarize: Count by Created At: Year
  3. Add a filter for "Created At: Year"
  4. Most of the filter options don't make sense (e.g. Today or Yesterday)

Month of Year

  1. New > Question > Raw Data > Sample Database > Orders
  2. Summarize: Count by "Created At: Month of Year" (do not confuse with "Created At: Month")
  3. Add a filter for "Created At: Month"
  4. Again, most of the filter options don't make sense since "Created At: Month of Year" is rather a Category column now
Information about your Metabase installation

master

Severity

P3

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue through New > Question > Raw Data > Sample Database > Orders, using the Created At Year and Month of Year summaries described above. Inspect the date filter picker behavior for these temporal units; done means irrelevant options such as Today and Yesterday are not offered or do not produce invalid filters, with the existing reproduction cases covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
clojure
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.