Skip to content

Fix capacity handling for duplicate External slots - #678

Draft
eduardpiazza wants to merge 1 commit into
SergeyMosin:masterfrom
eduardpiazza:fix/external-slot-capacity
Draft

Fix capacity handling for duplicate External slots#678
eduardpiazza wants to merge 1 commit into
SergeyMosin:masterfrom
eduardpiazza:fix/external-slot-capacity

Conversation

@eduardpiazza

Copy link
Copy Markdown

Summary

  • treat each External source event occurrence as an independent capacity unit, identified by source object URI plus occurrence start/end
  • persist that identity on destination bookings as X-APPT-SOURCE
  • consume only the matching source occurrence when a booking exists, so booking one of 100 duplicate slots leaves 99 available
  • keep legacy, manual, moved, or source-missing destination events as normal busy-time blockers
  • apply the same source-aware logic during the booking re-check to retain race-condition protection

This intentionally scopes the change to External mode. Weekly Template capacity is not changed here.

Addresses the External-mode capacity case discussed in #668. Related to #54.

Tests

  • ExternalSlotCapacityTest: 6 tests, 18 assertions
  • PHP syntax checks for all changed PHP files
  • composer validate --no-check-publish
  • git diff --check

The complete repository unit bootstrap requires a full Nextcloud server checkout because tests/bootstrap.php loads ../../../lib/base.php; that server checkout is not present in this standalone app checkout.

@eduardpiazza
eduardpiazza force-pushed the fix/external-slot-capacity branch from 87ca61d to 58e24fd Compare July 24, 2026 13:15
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