Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Metabase
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Engineering Digital Service
Metabase
Commits
b88f8e63
Unverified
Commit
b88f8e63
authored
3 years ago
by
Dalton
Committed by
GitHub
3 years ago
Browse files
Options
Downloads
Patches
Plain Diff
use is-null filter when value is null (#16601)
parent
cd33b54a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
frontend/src/metabase/modes/lib/actions.js
+3
-1
3 additions, 1 deletion
frontend/src/metabase/modes/lib/actions.js
frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
+29
-0
29 additions, 0 deletions
...arios/visualizations/drillthroughs/chart_drill.cy.spec.js
with
32 additions
and
1 deletion
frontend/src/metabase/modes/lib/actions.js
+
3
−
1
View file @
b88f8e63
...
...
@@ -152,8 +152,10 @@ export function drillFilter(
const
range
=
rangeForValue
(
value
,
column
);
if
(
range
)
{
filter
=
[
"
between
"
,
fieldRefForColumn
(
column
),
range
[
0
],
range
[
1
]];
}
else
{
}
else
if
(
value
!=
null
)
{
filter
=
[
"
=
"
,
fieldRefForColumn
(
column
),
value
];
}
else
{
filter
=
[
"
is-null
"
,
fieldRefForColumn
(
column
)];
}
}
...
...
This diff is collapsed.
Click to expand it.
frontend/test/metabase/scenarios/visualizations/drillthroughs/chart_drill.cy.spec.js
+
29
−
0
View file @
b88f8e63
...
...
@@ -414,6 +414,35 @@ describe("scenarios > visualizations > drillthroughs > chart drill", () => {
cy
.
findByText
(
"
Showing 85 rows
"
);
});
it
(
"
should drill through on a bin of null values (#11345)
"
,
()
=>
{
visitQuestionAdhoc
({
name
:
"
11345
"
,
dataset_query
:
{
database
:
1
,
query
:
{
"
source-table
"
:
ORDERS_ID
,
aggregation
:
[[
"
count
"
]],
breakout
:
[
[
"
field
"
,
ORDERS
.
DISCOUNT
,
{
binning
:
{
strategy
:
"
default
"
}
}],
],
},
type
:
"
query
"
,
},
display
:
"
table
"
,
});
// click on the Count column cell showing the count of null rows
cy
.
findByText
(
"
16,845
"
).
click
();
cy
.
findByText
(
"
View these Orders
"
).
click
();
// count number of distinct values in the Discount column
cy
.
findByText
(
"
Discount ($)
"
).
click
();
cy
.
findByText
(
"
Distincts
"
).
click
();
// there should be 0 distinct values since they are all null
cy
.
get
(
"
.TableInteractive-cellWrapper
"
).
contains
(
"
0
"
);
});
it
(
"
should parse value on click through on the first row of pie chart (metabase#15250)
"
,
()
=>
{
cy
.
createQuestion
({
name
:
"
15250
"
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment