Skip to content
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

Handle booleans in filter editor #13406

Merged
merged 2 commits into from Aug 16, 2017

Conversation

Projects
None yet
4 participants
@lukasolson
Copy link
Member

commented Aug 9, 2017

Fixes #12745.

This PR updates the filter editor to properly handle fields of type boolean. It also removes the "is one of" and "is not one of" options from the boolean field type (because they don't make much sense).

image

@cjcenizal

This comment has been minimized.

Copy link
Contributor

commented Aug 9, 2017

FWIW, I think the UI will be a little easier to parse if you use a select with "true" and "false" options instead of a checkbox here. It's kind of an unusual checkbox behavior to check it and cause the label to change.

@lukasolson

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2017

@cjcenizal I agree. I've updated it to use a select instead.

@Bargs

Bargs approved these changes Aug 9, 2017

Copy link
Contributor

left a comment

LGTM

While I was testing this I also noticed boolean scripted fields are incorrectly showing an empty string in the filter pill. Thought I'd mention it in case you were feeling in the mood, otherwise we can create a separate ticket for it :)

screen shot 2017-08-09 at 5 36 42 pm

@lukasolson

This comment has been minimized.

Copy link
Member Author

commented Aug 9, 2017

I also noticed boolean scripted fields are incorrectly showing an empty string in the filter pill.

Are you sure you're not using some sort of formatter that's doing this? When I create a scripted boolean, I don't see this:

image

@weltenwort

This comment has been minimized.

Copy link
Contributor

commented Aug 10, 2017

I was able to reproduce the "empty bool value" effect that @Bargs reported by performing these steps in the same tab without reloading:

  • create a new index pattern
  • go to discover, add one of the fields as a column
  • go to index pattern settings, add a scripted bool field
  • go back to discover
  • add the new scripted field as a column

For me, all the values in that column as well as the filter descriptions were empty. There seems to be something wrong with the boolean field formatters, so it is probably not related to this PR. A page reload fixes it.

@lukasolson lukasolson merged commit c4c6ea1 into elastic:master Aug 16, 2017

2 checks passed

CLA Commit author has signed the CLA
Details
kibana-ci Build finished.
Details

lukasolson added a commit to lukasolson/kibana that referenced this pull request Aug 16, 2017

Handle booleans in filter editor (elastic#13406)
* Handle booleans in filter editor

* Use select instead of checkbox

lukasolson added a commit that referenced this pull request Aug 16, 2017

Handle booleans in filter editor (#13406)
* Handle booleans in filter editor

* Use select instead of checkbox

lukasolson added a commit that referenced this pull request Aug 16, 2017

Handle booleans in filter editor (#13406)
* Handle booleans in filter editor

* Use select instead of checkbox

chrisronline added a commit to chrisronline/kibana that referenced this pull request Nov 20, 2017

Handle booleans in filter editor (elastic#13406)
* Handle booleans in filter editor

* Use select instead of checkbox

chrisronline added a commit to chrisronline/kibana that referenced this pull request Dec 1, 2017

Handle booleans in filter editor (elastic#13406)
* Handle booleans in filter editor

* Use select instead of checkbox

@lukasolson lukasolson deleted the lukasolson:filterEditorBools branch Mar 27, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.