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

Sorting may change when adding a note in the notes column #1102

Open
Arnei opened this issue Feb 3, 2025 · 0 comments
Open

Sorting may change when adding a note in the notes column #1102

Arnei opened this issue Feb 3, 2025 · 0 comments
Labels
type:bug Something isn't working

Comments

@Arnei
Copy link
Member

Arnei commented Feb 3, 2025

To reproduce:

  • Add the notes column to the events table
  • Have multiple events with the same start date X
  • Sort the events table by start date (the default sorting)
  • Add a note to the topmost event with start date X.
  • After a couple seconds, the event may now be the lowermost event with start date X.

It looks like the comment/events "jumps" to another position. This can confuse users and cause misinputs.

@Arnei Arnei added the type:bug Something isn't working label Feb 3, 2025
Arnei added a commit to Arnei/opencast-admin-interface that referenced this issue Feb 3, 2025
**WILL BREAK THE UI WITHOUT THE REQUIRED BACKEND CHANGES:** opencast/opencast#6461

The events table is sorted by a sort parameter. By default, this is
the start date. If there are multiple events with the same start date,
the sorting for those is left to the elasticseach index in the
backend. Elasticsearch however does not guarantee any ordering.
This may result in the order of events changing unexpectedly like
in opencast#1102.

This patch aims to solve this by adding a secondary
sort parameter to the
events query. The primary parameter still takes priority.
For the secondary parameter, `uid` was chosen as it is the only
field guaranteed to be unique.

More sorting parameters can lead to increased query times.
If someone with *many* events could test
the impact of these changes
that would be great.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant