Skip to content

Fix multi-day ICS downloads dropping location fields - #206

Merged
edalzell merged 6 commits into
6.xfrom
fix/multi-day-ics-missing-fields
Sep 8, 2026
Merged

edalzell merged 6 commits into
6.xfrom
fix/multi-day-ics-missing-fields

Conversation

@edalzell

@edalzell edalzell commented Sep 8, 2026

Copy link
Copy Markdown
Member

Summary

  • Extract shared decorate() for address/coordinates/description/url onto the base Event type
  • Apply it to multi-day whole-event downloads (previously only UID/start/end)
  • Guard partial/non-numeric coordinates so they omit GEO instead of 500ing

Closes #192
Part of #190

Test plan

  • vendor/bin/pest --filter=IcsControllerTest
  • Download a multi-day event without a date param and confirm LOCATION/URL/DESCRIPTION/GEO appear for each day
  • Confirm single-day, recurring, and multi-day ?date= downloads still include those fields

Document the actual 6.x LOCATION/URL/GEO/DESCRIPTION resolution in one table and cross-reference it from events:download_link.
Share decorate() across event types and guard coordinates so whole-event downloads keep LOCATION/URL/DESCRIPTION/GEO.
Subclasses build the bare event; only the base toICalendarEvent path applies location fields.
@edalzell
edalzell force-pushed the fix/multi-day-ics-missing-fields branch from 5e2f0ba to 278c8d4 Compare September 8, 2026 22:56
@edalzell

edalzell commented Sep 8, 2026

Copy link
Copy Markdown
Member Author

Updated: decorate() now only runs inside base toICalendarEvent(). Subclasses override buildICalendarEvent() / call toICalendarEvent() from toICalendarEvents() instead of decorating at every call site.

Also retargeted this PR onto fix/reconcile-ics-field-docs (#205) so the 6.x work stays stacked. We'll forward-merge to main once the 6.x stack is done (#207 closed).

Use the same null-check and single-element array form as RecurringEvent.
Entry::get() is untyped; mixed avoids a TypeError on the public ICS route.
@edalzell
edalzell merged commit 961820d into 6.x Sep 8, 2026
25 checks passed
@edalzell
edalzell deleted the fix/multi-day-ics-missing-fields branch September 8, 2026 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant