Import and export ICS from Calendar
Closed, ResolvedPublic

Tokens
"Party Time" token, awarded by ftdysa."Mountain of Wealth" token, awarded by jayvdb."Mountain of Wealth" token, awarded by hach-que."Haypence" token, awarded by chad.
Assigned To
Authored By
epriestley, Apr 7 2016

Description

It is a thing for events:

Excellent news: we can make events play custom sounds from arbitrary URLs! But will clients respect them? I can only hope.


Done:

  • SearchEngine / view all for import logs.
  • Delete all events from a source.
  • ICS errors probably throw instead of hitting the log?
  • Drag-and-droping an ICS file should import it.
  • Silence mail/feed for imports.
  • Show that imported events were imported on detail screen.
    • Link back to source.
    • Better messaging for explaining why you can't edit them?
  • Engine properties on import details.
  • When stubs/instances (can instances be generated?) are generated from an imported event, carry over the import source.
  • URL-based ICS imports.
  • Reload imports action.
  • Missing (int) cast on interval/COUNT.
  • Actually support COUNT.
  • Triggers for periodic imports (URL/Google).
  • Import attendees.
  • Try that GMail header stuff from @20after4.
  • Export host/organizer.

Still to be done:

  • Rules for collapsing duplicate instances of imported events for a viewer while querying, so they don't all show up on views.

Details

Commits
D16772 / rPe1a9b7694517: Give organizers in ICS exports a dummy email address to placate Gmail
D16771 / rPd9c91f857cef: Apply a TYPE_CREATE transaction when importing events to improve strings in…
D16770 / rP96b064b7e9b2: Properly import all-day events in Calendar
D16768 / rP1e488e92771a: When importing events, delete events which have been removed on the other end
D16766 / rP1014a2771795: Document Calendar imports
D16767 / rPHUf62a265bad60: Fix an issue importing instantaneous events
D16759 / rP09775279a949: Support arbitary event invitees when importing events
D16761 / rPHUdaeaed6bfbc3: Parse (and discard) VALARM sections in ICS files
D16760 / rPHUef96bb56fc2b: When importing ICS events, also import attendees
D16752 / rP2d7f574b9d6d: Allow Calendar imports to be configured with hourly or daily auto-updates
D16748 / rPHU6d6308803540: Fix import casts for RRULE "INTERVAL" and "COUNT" properties
D16749 / rP48666839feb5: Support RRULE "COUNT" for recurring events
D16747 / rPf4a3887b6bdd: Add an explicit "Reload Import" action to imports
D16730 / rP314dc30017d4: Add a URI-based ICS import source engine
D16729 / rPHUf275bb3a363d: Fix some minor parsing bugs in ICS parser
D16728 / rPc3de8f8305a9: When generating Calendar event stubs, inherit import properties
D16727 / rPd860008b6a45: Make event detail view more user-friendly for imported events
D16726 / rP5039b9ca28e4: Add some descriptive properties when viewing a Calendar import
D16723 / rPcc0f0b386525: Don't publish feed stories or send mail about imported events
D16722 / rPf9f25c1e4d5b: Allow users to drop .ics files on calendar views to import them
D16721 / rP67cb277bed6c: When import fails because we can't parse an ICS file, show it nicely
D16720 / rPb47a42bf5583: Allow events from a particular import source to be bulk-deleted
D16719 / rP94a5a09d7544: Add a SearchEngine for Calendar import logs
D16716 / rP860809ae79b1: Reject high-frequency and out-of-range events during import
D16715 / rPHU6db57365a28b: Import RRULEs when parsing Calendar events
D16704 / rP3d985585937c: Add import log messages to Calendar imports
D16703 / rPc2411e3dcc9c: When viewing a Calendar import, show all the events it imported
D16702 / rP6e2a86470b47: Support disabling calendar imports
D16701 / rPced151e6f2e8: Use transactions when importing events in Calendar, and update existing events
D16699 / rP86a00ee4abd6: Make Calendar ICS imports sort of work in a crude, approximate way
D16698 / rPHU72a4c65ec945: Fix some libphutil Calendar document bugs
D16696 / rP2ab07ed29bd9: Prepare for event imports in Calendar
D16681 / rPbc6e6c0500b7: Allow Calendar exports to be disabled
D16680 / rPff97ed219599: Document how to export Calendar events
D16679 / rP4819446fe511: Export recurring events and build ICS files for configured exports
D16678 / rPHU48fb6fac0232: Add support for exporting RECURRENCE-ID in ICS events
D16676 / rPfa6a5a46ba57: Make more of the Calendar export workflow work
D16675 / rP49448a87c17c: Rough in most of Calendar exports
D16670 / rP3164ff68db58: Convert Calendar Events to use RRULE frequency constants in various other places
D16668 / rP20f7de91ceb5: Drive calendar event queries through the RRULE engine
D16664 / rPd3fc1800f86a: Migrate Calendar away from stored-epoch fields
D16663 / rPfae0ec9220a7: Use more CalendarDateTime and fewer epoch timestamps in Calendar
D16662 / rP37f35e9ecca6: Remove "viewerDateFrom" / "viewerDateTo" in favor of CalendarDateTime methods
D16661 / rPe042533375d3: Store "start", "end", and "until" event dates as CalendarDateTime objects
D16652 / rP0ce7eacaf1c1: Introduce Calendar "UTC Epoch" columns for query windowing
D16653 / rPHU5a9e3ef1bfe0: Allow DateTime objects to be serialized and deserialized
D16648 / rPHU65eed1be889e: Support RRULE export in ICS from libphutil
D16637 / rPHU4b12a4f7a31a: Implement RRULE FREQ=WEEKLY tests and BYSETPOS with WEEKLY
D16634 / rPHU68bb2c62181d: Implement RFC5545 WEEKLY RRULE tests
D16633 / rPHU9bf1784ca265: Add most RFC5545 tests for RRULEs
D16631 / rPHUb077cfaf1b07: Add SECONDLY tests to RRULE code
D16630 / rPHU1024f03f68e8: Support BYSETPOS for RRULE events with FREQ=MINUTELY
D16629 / rPHU49f472ab8578: Support BYSETPOS for RRULE events with FREQ=HOURLY
D16628 / rPHU91cf945a2bdf: Fix a TERRIBLE RRULE issue with INTERVAL interacting with ALL OTHER RULES and…
D16622 / rPHUf6424183c50e: Add RRULE support for SETPOS with FREQ=DAILY
D16619 / rPHU83e9aaa17832: Fix an RRULE bug with day cursors and skipped months
D16617 / rPHU1a5bbe5971cc: Implement BYSETPOS for YEARLY and MONTHLY RRULES
D16616 / rPHU16cb15ae0c22: Add many working RRULE test cases
D16615 / rPHU50db12901a84: Fix an RRULE bug with MONTHLY INTERVALs larger than 12
D16614 / rPHU90b5670cd5e0: Implement RRULE support for BYDAY with relative offsets ("FREQ=YEARLY;BYDAY=…
D16613 / rPHU4e9a2288f527: Add some working RRULE unit tests
D16612 / rPHU9a923abf4e49: Fix an RRULE issue with all-day events expanded by BYHOUR or high-frequency…
D16611 / rPHU51a1ac172a35: Fix RRULE bugs with week numbers for leading and trailing partial weeks
D16610 / rPHU9db0dd4fe2fd: Fix some RRULE bugs with BYWEEKNO
D16609 / rPHUa84b6f73a7dd: Fix two RRULE bugs with YEARDAY
D16608 / rPHUa1254d047a55: Fix a RRULE issue with BYDAY and similar constraints in noninitial months
D16607 / rPHU03ca6a391f8e: Fix a remaining `cursorYear` instead of `stateYear`
D16606 / rPHU4f0b4899b570: Fix an RRULE issue where BYMONTHDAY did not properly expand the month set
D16605 / rPHUe7ff546372db: Fix an RRULE issue with month days at the end of the month
D16603 / rPHU5e5ae77b462b: Validate various RRULE components and simplify logic slightly
D16599 / rPHU103f13c03f38: Rough cut of implementing some of RRULE behaviors
D16590 / rPHU1a0371a2247a: Add initial support for complex recurring events
D16559 / rP3d6c3c2c45e8: Make .ics export less scary and attach .ics files to event mail
D16558 / rP96f800249b31: Export ORGANIZER and ATTENDEE sections in ".ics" files from Calendar
D16557 / rPHUfa6519f4cea1: Add "ORGANIZER" and "ATTENDEE" sections to ICS writer
D16553 / rP47debbd57c85: Add an "Export as .ics" action to Calendar events
D16552 / rPHUb398e48a8fc7: Support more ICS parameters and properties
D16551 / rPHU7c1fc80a54f0: Write basic ICS files from Phutil intermediate objects
D16548 / rPHUf241706ade25: Parse ICS datetimes and durations
D16521 / rPHUf8af794b2135: Make error handling for ICS parsing more robust
D16520 / rPHU0107c187b6d8: Add a very basic ICS syntax parser
There are a very large number of changes, so older changes are hidden. Show Older Changes
ftdysa awarded a token.Oct 6 2016, 9:50 PM
epriestley moved this task from Backlog to The Queue on the Prioritized board.Oct 13 2016, 2:20 PM
epriestley updated the task description. (Show Details)Oct 18 2016, 6:00 PM
epriestley updated the task description. (Show Details)Oct 18 2016, 8:41 PM
epriestley updated the task description. (Show Details)Oct 18 2016, 8:56 PM
epriestley updated the task description. (Show Details)Oct 18 2016, 9:31 PM
epriestley updated the task description. (Show Details)Oct 18 2016, 9:36 PM
epriestley updated the task description. (Show Details)Oct 19 2016, 4:03 PM
epriestley updated the task description. (Show Details)Oct 19 2016, 4:20 PM
epriestley updated the task description. (Show Details)Oct 25 2016, 4:08 PM
epriestley updated the task description. (Show Details)Oct 25 2016, 5:10 PM
epriestley updated the task description. (Show Details)Oct 25 2016, 6:27 PM
epriestley updated the task description. (Show Details)Oct 26 2016, 6:52 PM
adam93 added a subscriber: adam93.Oct 27 2016, 2:04 PM
epriestley updated the task description. (Show Details)Oct 27 2016, 9:34 PM

OK I imported some real great events:

No one can see them but they're great.

The Gmail/ICS integration seems to actually work OK in practice, here's an event from this install working (modulo some stuff like us not exporting a host/organizer yet):

I think it doesn't show this UI when it thinks the sender is "bad", for some definition of "bad". In the case of my non-working test cases, they came from a complex series of mailbox aliases because my mail test setup does a lot of weird magic, so I think we're OK on the header stuff as-is. We can revisit this if users are having issues in the wild, but seems to be working OK for me.

epriestley updated the task description. (Show Details)Oct 30 2016, 3:45 PM
epriestley updated the task description. (Show Details)Oct 30 2016, 4:21 PM

(Google API integration is covered by T2334 -- you can already interact with Google Calendar via ICS files, but that will add support for using the API instead.)

I'm going to file the duplicate import thing as a separate task since it probably won't come up for a while and close this out.

epriestley closed this task as Resolved.Oct 30 2016, 5:45 PM

Duplicate thing filed in T11800.

timor added a subscriber: timor.Dec 20 2016, 3:58 PM
timor removed a subscriber: timor.