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

Fix sorting of dataset drafts and minor versions when sorting by "newest first" #11180

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

vera
Copy link
Contributor

@vera vera commented Jan 23, 2025

What this PR does / why we need it:

This PR fixes an issue where draft and minor versions of datasets were sorted using the release timestamp of their most recent major version.
This caused newer drafts or minor versions to appear incorrectly alongside their corresponding major version, instead of at the top, when sorted by "newest first". This affects the search results page and the "My data" page, both of which are sorted by newest by default.
Sorting now consistently uses the last update timestamp for all dataset versions (draft, minor, and major).

See bug description with screenshot etc in #11178

Which issue(s) this PR closes:

Special notes for your reviewer:

/

Suggestions on how to test this:

I've added a test that can be run with: mvn test -Dtest="DataRetrieverApiIT#testRetrieveMyDataAsJsonStringSortOrder"

Does this PR introduce a user interface change? If mockups are available, please link/include them here:

/

Is there a release notes update needed for this change?:

I think it would be good to include a release note for this bug fix, since it affects the default sorting of datasets on the search results and "My data" page. I've added a release note as part of this PR

Additional documentation:

/

@pdurbin
Copy link
Member

pdurbin commented Jan 23, 2025

TODO: Review the sorting rules from https://docs.google.com/document/d/1DWsEqT8KfheKZmMB3n_VhJpl9nIxiUjai_AIQPAjiyA/edit?usp=sharing and update this comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Ready for Triage
Development

Successfully merging this pull request may close these issues.

Bug?: unexpected sorting of results when sorting by "newest first" (Search + My Data)
2 participants