Skip to content

fix: keep free time from AVAILABLE blocks that start before the query - #805

Open
ndo84bw wants to merge 1 commit into
sabre-io:masterfrom
ndo84bw:fix/availability-instance-overlapping-start
Open

ndo84bw wants to merge 1 commit into
sabre-io:masterfrom
ndo84bw:fix/availability-instance-overlapping-start

Conversation

@ndo84bw

@ndo84bw ndo84bw commented Nov 2, 2026

Copy link
Copy Markdown

Summary

Thunderbird asks a Nextcloud server for free/busy times from 08:00.
The attendee is available every weekday from 07:00 to 16:00 (a repeating AVAILABLE block). The answer shows the whole day as busy.
When asked from 07:00 or earlier, the answer is right.

The code skipped every repeating AVAILABLE block that started before the query time, even when the block ran into it.

Now it only skips blocks that end before the query time. A block that starts earlier is cut to fit, the same way it is already cut at the end.

Tests

  • testVAvailabilityRecurrenceStartsBeforeReport: the bug above.
  • testVAvailabilityRecurrenceStartsBeforeVAvailability: same, when the
    VAVAILABILITY itself starts in the middle of a block.
  • testVAvailabilityRecurrenceEndsBeforeVAvailability: a block that ends before the VAVAILABILITY starts must not count. This one also passes without the fix; it guards the new check.

Backport

Nextcloud uses sabre/vobject 4.5.x, see nextcloud/server#61191. Could this go to 4.5 too? The patch applies cleanly to 4.5 and 4.6 and I can open the backport PRs.

A repeating AVAILABLE block that started before the query time was
skipped, even when it ran into the query. That time showed as busy
instead of free.

Assisted-by: ClaudeCode:claude-opus-5-5
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