-
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
Fix field values remapping with models & custom dropdown source in public dashboards #44099
Conversation
|
return dimension?.field(); | ||
} | ||
|
||
if (isConcreteFieldReference(fieldRef)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is taken from master
and adopted for MLv1
@@ -99,6 +99,7 @@ class FieldInner extends Base { | |||
|
|||
// added when creating "virtual fields" that are associated with a given query | |||
query?: StructuredQuery | NativeQuery; | |||
_comesFromEndpoint?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an existing field which was previously untyped
return { ...parameter, hasVariableTemplateTagTarget: true }; | ||
return { | ||
...parameter, | ||
hasVariableTemplateTagTarget: !isDimensionTarget(target), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix from master
. In case we fail to find the field, do not assume it's a native query variable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤞
Fixes #44047
Repro https://www.loom.com/share/bd15abd6412f46d0aa778f3388169e34
I didn't manage to repro the same issue in E2E no matter what I tried. So I made API calls with data for what I reproduced locally - see the video above. The repro is not 100% correct as the model query doesn't execute. But without the fix the repro fails, which is good.
In the issue we're hitting this
metabase/frontend/src/metabase-lib/Dimension.ts
Line 843 in ddf5b10
How to verify: