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

Scripted Fields: Unable to sort on scripted boolean fields in Discover . #75519

Closed
rashmivkulkarni opened this issue Aug 20, 2020 · 5 comments
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Scripted Fields Scripted fields features impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)

Comments

@rashmivkulkarni
Copy link
Contributor

Kibana version: 8.0

Unable to sort on scripted field - boolean in Discover .

Steps:

  1. Add sample data set - I chose eCommerce
  2. Add a boolean scripted field
  3. Navigate to discover add the boolean field and try sorting on it . Sorting doesn't happen as expected it to be. ( true/false)

Screen Shot 2020-08-19 at 9 45 52 PM

@rashmivkulkarni rashmivkulkarni added Feature:Scripted Fields Scripted fields features Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Aug 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@rashmivkulkarni
Copy link
Contributor Author

Functionality is not there - add a sorting mechanism to scripted boolean fields in Discover. The test has been already added and skipped. Should enable when the functionality is added.
part of #95349

Stacktrace
Error: retry.try timeout: Error: expected 'Sep 18, 2015 @ 18:20:57.916\ntrue' to equal 'updateExpectedResultHere\ntrue'
    at Assertion.assert (node_modules/@kbn/expect/expect.js:100:11)
    at Assertion.be.Assertion.equal (node_modules/@kbn/expect/expect.js:227:8)
    at Assertion.be (node_modules/@kbn/expect/expect.js:69:22)
    at /dev/shm/workspace/parallel/13/kibana/test/functional/apps/management/_scripted_fields.js:358:30
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at runAttempt (test/common/services/retry/retry_for_success.ts:27:15)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:66:21)
    at Retry.try (test/common/services/retry/retry.ts:32:14)
    at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:356:9)
    at Object.apply (node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)
    at onFailure (test/common/services/retry/retry_for_success.ts:17:9)
    at retryForSuccess (test/common/services/retry/retry_for_success.ts:57:13)
    at Retry.try (test/common/services/retry/retry.ts:32:14)
    at Context.<anonymous> (test/functional/apps/management/_scripted_fields.js:356:9)
    at Object.apply (node_modules/@kbn/test/src/functional_test_runner/lib/mocha/wrap_function.js:73:16)

cc @LeeDr @elastic/kibana-app

@stratoula stratoula added Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews) and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels May 30, 2023
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-data-discovery (Team:DataDiscovery)

@davismcphee davismcphee added bug Fixes for quality problems that affect the customer experience loe:needs-research This issue requires some research before it can be worked on or estimated impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. labels May 30, 2023
@kertal
Copy link
Member

kertal commented Jun 2, 2023

Tested, and yes, there's an still an issue with boolean scripted fields in Discover, however it works with runtime fields.

@mattkime
Copy link
Contributor

Kibana scripted fields cannot be used to sort as they're passed as part of the query and not specifically part of the sort as shown here - https://www.elastic.co/guide/en/elasticsearch/painless/current/painless-sort-context.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Scripted Fields Scripted fields features impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. loe:needs-research This issue requires some research before it can be worked on or estimated Team:DataDiscovery Discover App Team (Document Explorer, Saved Search, Surrounding documents, Data, DataViews)
Projects
None yet
Development

No branches or pull requests

6 participants