Skip to content
Snippets Groups Projects
Unverified Commit e1b99b61 authored by Cam Saul's avatar Cam Saul Committed by GitHub
Browse files

Drill-thru with binning should use `[and [>= ...] [< ...]`, not `[between ...]` (#28465)

* Fix #15324

* Update tests
parent c605f7cd
No related branches found
No related tags found
No related merge requests found
......@@ -113,7 +113,8 @@ export function drillFilter(query, value, column) {
} else {
const range = rangeForValue(value, column);
if (range) {
filter = ["between", fieldRefForColumn(column), range[0], range[1]];
const fieldRef = fieldRefForColumn(column);
filter = ["and", [">=", fieldRef, range[0]], ["<", fieldRef, range[1]]];
} else if (value != null) {
filter = ["=", fieldRefForColumn(column), value];
} else {
......
......@@ -498,7 +498,7 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
});
});
it.skip("count of rows from drill-down on binned results should match the number of records (metabase#15324)", () => {
it("count of rows from drill-down on binned results should match the number of records (metabase#15324)", () => {
visitQuestionAdhoc({
name: "15324",
dataset_query: {
......@@ -520,7 +520,8 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
.contains("85")
.click();
cy.findByText("View these Orders").click();
cy.findByText("Quantity between 10 20");
cy.findByText("Quantity is greater than or equal to 10");
cy.findByText("Quantity is less than 20");
cy.findByText("Showing 85 rows");
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment