Skip to content
Snippets Groups Projects
Gautam Das's avatar
Issue #3320088 by das.gautam, kasey_mk: Specify required version of johngrogg/ics-parser
Gautam Das authored
d835ffdd
History

Migrate Source iCal

This module provides a source plugin to migrate iCal data into Drupal entities.

Requirements

Example Migration Configuration

Below is an example configuration for migrating event data from a .ics file:

id: events
label: 'Events'
migration_group: ical
source:
  plugin: ical
  path: 'https://example.com/basic.ics'
  identifier: upc
  identifierDepth: 1
  high_water_property:
    name: lastmodified
  fields:
    - uid
    - summary
    - description
    - lastmodified
    - dtstart
    - dtend
    - location
  keys:
    - uid
process:
  type:
    plugin: default_value
    default_value: events
  title: summary
  body: description
  field_event_date/value:
    - plugin: format_date
      from_format: Ymd
      to_format: Y-m-d
      source: dtstart
  field_event_date/end_value:
    - plugin: format_date
      from_format: Ymd
      to_format: Y-m-d
      source: dtend
  sticky:
    plugin: default_value
    default_value: 0
  status:
    plugin: default_value
    default_value: published
  uid:
    plugin: default_value
    default_value: 1

destination:
  plugin: 'entity:node'

migration_dependencies: {}

Usage

To run the migration, use the following Drush command:

drush migrate:import events

To roll back the migration:

drush migrate:rollback events

Notes

  • Ensure the .ics file URL is accessible.
  • Modify field mappings as needed based on your Drupal setup.
  • Add custom process plugins if additional transformation is required.