Skip to content
Snippets Groups Projects
Commit d49acd13 authored by Atte Keinänen's avatar Atte Keinänen
Browse files

Fix bug with table visualization and Zoom In pivot action

parent 9fda1fd8
Branches
Tags
No related merge requests found
......@@ -4,4 +4,9 @@ describe("TimeseriesPivotDrill", () => {
// Would be nice to run an integration test here to make sure that the resulting MBQL is valid and runnable
pending();
});
it("should accept the dimension value as a year string as in table visualization", () => {
// Intented to test that "Zoom In" for a table cell when you have broken out by year works correctly
// Could also be part of more comprehensive QB integrated test where the table cell is actually clicked
pending();
})
});
......@@ -16,6 +16,7 @@ import type Table from "metabase-lib/lib/metadata/Table";
import type { Card as CardObject } from "metabase/meta/types/Card";
import type { StructuredQuery, FieldFilter } from "metabase/meta/types/Query";
import type { DimensionValue } from "metabase/meta/types/Visualization";
import { parseTimestamp } from "metabase/lib/time";
// TODO: use icepick instead of mutation, make they handle frozen cards
......@@ -83,6 +84,7 @@ export const filter = (card, operator, column, value) => {
};
const drillFilter = (card, value, column) => {
let filter;
if (isDate(column)) {
filter = [
......@@ -93,7 +95,7 @@ const drillFilter = (card, value, column) => {
"as",
column.unit
],
moment(value).toISOString()
parseTimestamp(value, column.unit).toISOString()
];
} else {
filter = ["=", getFieldRefFromColumn(column), value];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment