Skip to content

Conversation

@backportbot
Copy link

@backportbot backportbot bot commented May 29, 2024

Backport of PR #45222

@backportbot backportbot bot requested a review from kesselb May 29, 2024 14:54
@backportbot backportbot bot added bug 3. to review Waiting for reviews feature: caldav Related to CalDAV internals labels May 29, 2024
@backportbot backportbot bot added this to the Nextcloud 29.0.2 milestone May 29, 2024
@kesselb kesselb force-pushed the backport/45222/stable29 branch from de1ed77 to 1f82966 Compare June 3, 2024 15:52
@Altahrim Altahrim mentioned this pull request Jun 6, 2024
19 tasks
kesselb added 2 commits June 6, 2024 12:29
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 <[email protected]>
Sorting the events by the start date leads to more predictable results for the search API consumers.

Signed-off-by: Daniel Kesselberg <[email protected]>
@kesselb kesselb force-pushed the backport/45222/stable29 branch from 1f82966 to 8330825 Compare June 6, 2024 10:29
@ChristophWurst ChristophWurst added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jun 6, 2024
@skjnldsv skjnldsv merged commit 0c8e34e into stable29 Jun 7, 2024
@skjnldsv skjnldsv deleted the backport/45222/stable29 branch June 7, 2024 10:12
@blizzz blizzz mentioned this pull request Jun 11, 2024
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: caldav Related to CalDAV internals

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants