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

[BUG][Discover] Unable to sort boolean scripted fields #5126

Open
ananzh opened this issue Sep 26, 2023 · 3 comments
Open

[BUG][Discover] Unable to sort boolean scripted fields #5126

ananzh opened this issue Sep 26, 2023 · 3 comments
Assignees
Labels
bug Something isn't working data explorer Issues related to the Data Explorer project discover for discover reinvent good first issue Good for newcomers

Comments

@ananzh
Copy link
Member

ananzh commented Sep 26, 2023

This is a legacy issue and not caused by Discover 2.0. This functional test is skipped due to this bug:

//add a test to sort boolean
      //existing bug: https://github.com/elastic/kibana/issues/75519 hence the issue is skipped.
      // TODO: replace updateExpectedResultHere with actual data value once bug is fixed
      it.skip('should sort scripted field value in Discover', async function () {
        await sleep(50000);
        await testSubjects.click(`dataGridHeaderCell-${scriptedPainlessFieldName2}`);
        await PageObjects.discover.clickTableHeaderListItem(
          scriptedPainlessFieldName2,
          'Sort True-False'
        );
        await PageObjects.header.waitUntilLoadingHasFinished();
        await testSubjects.click('dataGridHeaderCell-@timestamp');
        await PageObjects.discover.clickTableHeaderListItem('@timestamp', 'Sort A-Z');
        await PageObjects.header.waitUntilLoadingHasFinished();
        const sortedDataByTimeField = await PageObjects.discover.getDataGridTableValues();
        expect(sortedDataByTimeField[0][0]).contain('updateExpectedResultHere');
        expect(sortedDataByTimeField[0][1]).contain('true');

        await testSubjects.click('dataGridColumnSortingButton');
        await PageObjects.discover.removeSort(`${scriptedPainlessFieldName2}`);
        await PageObjects.header.waitUntilLoadingHasFinished();
        const sortedDataByPainlessField = await PageObjects.discover.getDataGridTableValues();
        expect(sortedDataByPainlessField[0][0]).contain('updateExpectedResultHere');
        expect(sortedDataByPainlessField[0][1]).contain('false');
      });
@ananzh ananzh added discover for discover reinvent data explorer Issues related to the Data Explorer project labels Sep 26, 2023
@ananzh ananzh added bug Something isn't working and removed untriaged labels Sep 26, 2023
@ananzh ananzh changed the title [BUG][Discover] Unable to sort on scripted boolean field [BUG][Discover] Unable to sort boolean scripted fields Sep 27, 2023
@ananzh ananzh added v2.12.0 good first issue Good for newcomers labels Oct 10, 2023
@vvavdiya
Copy link
Contributor

I'd like to take a look at this.
@ananzh can you please help with more context/details of the issue.

@shawnkchan
Copy link

Hi, I would like to be assigned this issue! Thank you

@ananzh
Copy link
Member Author

ananzh commented Oct 24, 2023

  • screen record for helping reproduce the bug
boolean-scripted-field-bug-reproduce.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data explorer Issues related to the Data Explorer project discover for discover reinvent good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants