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 Date scripted fields #5127

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

[BUG][Discover] Unable to sort Date scripted fields #5127

ananzh opened this issue Sep 26, 2023 · 2 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 date scripted field
      //https://github.com/elastic/kibana/issues/75711
      // TODO: replace updateExpectedResultHere with actual data value once bug is fixed
      it.skip('should sort scripted field value in Discover', async function () {
        await testSubjects.click(`dataGridHeaderCell-${scriptedPainlessFieldName2}`);
        await PageObjects.discover.clickTableHeaderListItem(scriptedPainlessFieldName2, 'Sort A-Z');
        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('2015-09-18 07:00');

        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('2015-09-18 07:00');
      });
@ananzh ananzh added bug Something isn't working discover for discover reinvent data explorer Issues related to the Data Explorer project labels Sep 26, 2023
@ananzh ananzh removed the untriaged label Sep 26, 2023
@ananzh ananzh changed the title [BUG][Discover] Unable to sort Date scripted fields in Discover [BUG][Discover] Unable to sort Date 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.

@vvavdiya
Copy link
Contributor

@ananzh
can you please help with more context/details of the issue and how to reproduce it?

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

2 participants