Add ICS calendar feed import with automatic blocking timeframes - #23
Open
datengraben wants to merge 1 commit into
Open
Add ICS calendar feed import with automatic blocking timeframes#23datengraben wants to merge 1 commit into
datengraben wants to merge 1 commit into
Conversation
Admins can now configure external ICS calendar URLs and link them to specific items/locations. A cron job syncs the feed hourly and creates HOLIDAYS_ID blocking timeframes for each calendar event, preventing bookings during those periods. - src/Service/ICSImport.php: fetch, parse (UTC/TZID/floating/all-day), and sync VEVENT blocks into cb_timeframe posts; UID-based delta sync avoids duplicates and cleans up removed events - src/Wordpress/CustomPostType/ICSFeed.php: admin-only CPT for feed config (URL, item/location targets, lookahead window); includes "Sync now" row action and status display in metabox - src/Plugin.php: register ICSFeed CPT; add it to body-class filter - src/Service/Scheduler.php: add hourly ICS sync cron job - tests/php/Service/ICSImportTest.php: unit + integration tests for parser (UTC, floating, TZID, all-day, line folding) and sync logic (create, update, cleanup, idempotency) https://claude.ai/code/session_01WxALKfRznRXqZRu6LQ2a23
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR introduces a new ICS (iCalendar) feed synchronization system that allows administrators to configure external calendar feeds and automatically create blocking timeframes for items/locations during calendar events. This makes items unavailable in the booking system when they're marked as busy in external calendars.
Key Changes
New
ICSImportService (src/Service/ICSImport.php):New
ICSFeedCustom Post Type (src/Wordpress/CustomPostType/ICSFeed.php):Scheduler Integration (
src/Service/Scheduler.php):Plugin Registration (
src/Plugin.php):ICSFeedcustom post type in the plugin initializationComprehensive Test Suite (
tests/php/Service/ICSImportTest.php):Notable Implementation Details
https://claude.ai/code/session_01WxALKfRznRXqZRu6LQ2a23