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

[stable29] CalDAV fix search with limit and time range #45566

Merged
merged 2 commits into from
Jun 7, 2024

Commits on Jun 6, 2024

  1. fix(caldav): event search with limit and timerange

    Event recurrences are evaluated at runtime because the database only knows the first and last occurrence.
    
    Given, a user created 8 events with a yearly reoccurrence and two for events tomorrow.
    The upcoming event widget asks the CalDAV backend for 7 events within the next 14 days.
    
    If limit 7 is applied to the SQL query, we find the 7 events with a yearly reoccurrence and discard the events after evaluating the reoccurrence rules because they are not due within the next 14 days and end up with an empty result even if there are two events to show.
    
    The workaround for search requests with a limit and time range is asking for more row than requested and retrying if we have not reached the limit.
    
    Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
    kesselb committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    449af33 View commit details
    Browse the repository at this point in the history
  2. feat(caldav): order the calendar objects by start date for search

    Sorting the events by the start date leads to more predictable results for the search API consumers.
    
    Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
    kesselb committed Jun 6, 2024
    Configuration menu
    Copy the full SHA
    8330825 View commit details
    Browse the repository at this point in the history