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

Make OAI record sorting consistent across paginated pages #19

Conversation

lianna-blanca
Copy link
Contributor

@lianna-blanca lianna-blanca commented Apr 18, 2023

This change updates the default filtering on function OaiRecords.php fetchOaiRecords() to consistently return results in order of LastEdited ascending, if no filters are in place.

At the moment there is no sorting of unfiltered results, and as per this issue, which creates problems as the first page of the PaginatedList is returned in a random order, but the second and later pages are sorted, meaning some items are never visible; see also this LincolnLTL ticket where the client first described the issue.

Kudos again to Tobie for helping me figure out some knotty bits of the phpunit test.

@lianna-blanca lianna-blanca force-pushed the bugfix/consistent-sorting-of-oai-records branch from 7f04f05 to 1989ad3 Compare April 18, 2023 02:18
@lianna-blanca lianna-blanca force-pushed the bugfix/consistent-sorting-of-oai-records branch from 1989ad3 to 193fbbc Compare April 18, 2023 02:26
@lianna-blanca lianna-blanca marked this pull request as ready for review April 18, 2023 21:40
Copy link
Member

@chrispenny chrispenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mwah

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great unit test! Good use of Reflection 😄

@chrispenny chrispenny merged commit a714129 into silverstripe-terraformers:main Apr 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants