Skip to content

Restore newest-first ordering in listEvents - #14278

Open
MitchDrage wants to merge 1 commit into
apache:4.20from
MitchDrage:listevents-sort-order
Open

MitchDrage wants to merge 1 commit into
apache:4.20from
MitchDrage:listevents-sort-order

Conversation

@MitchDrage

@MitchDrage MitchDrage commented Oct 1, 2026 •

Copy link
Copy Markdown

Description

listEvents has returned events oldest-first since 4.19.1.0, so the newest event shows up last, for example at the bottom of the dashboard Events tile.

This PR adds ORDER BY to searchByIds.

Alternative considered: re-sorting the loaded rows in QueryManagerImpl.searchForEventsInternal to match the id list.
I went with the ORDER BY for simplicity. The trade-off is that both queries now state the order and must agree.

Closes #14277

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • Build/CI
  • Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

Note the timestamps are now newest at the top.
image

How Has This Been Tested?

  • New unit test EventJoinDaoImplTest#testSearchByIdsOrdersNewestFirst. It fails without the fix and passes with it.
  • EventJoinDaoImplTest and QueryManagerImplTest pass.
  • Tested in simulator.

How did you try to break this feature and the system with this change?

Nil

This branch has not been deployed

No deployments
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.

1 participant