-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
[Lens] Escape field names in formula #102588
Conversation
Pinging @elastic/kibana-app (Team:KibanaApp) |
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.
Tested and works as expected, LGTM
Now we should automatically insert quotes when using these field names in the generate logic, but we can do this separately
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.
the only issue I fund was if I start to type the field already with a quote wrapping, selecting the field half-way from the suggestion box will add extra wrapping leading to an error state.
I guess it's something probably not so infrequent if there's a field to escape in the indexpattern, but it's not a blocking feature for this PR:
@flash1293 @dej611 I've updated this PR with fixes for the following cases:
|
@elasticmachine merge upstream |
Failed twice in exactly the same way:
Probably some upstream issue |
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.
Tested and works as expected, LGTM
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* [Lens] Escape field names in formula * Fix handling of partially typed fields with invalid chars Co-authored-by: Kibana Machine <[email protected]>
💚 Backport successful
This backport PR will be merged automatically after passing CI. |
Looks like this PR has a backport PR but it still hasn't been merged. Please merge it ASAP to keep the branches relatively in sync. |
* [Lens] Escape field names in formula * Fix handling of partially typed fields with invalid chars Co-authored-by: Kibana Machine <[email protected]> Co-authored-by: Wylie Conlon <[email protected]>
If your field name contains any invalid characters, it will get added as a quoted string. For example
my 'invalid' field
becomes'my \'invalid\' field'
Checklist