-1

I'm sure the issue is in my migration YML file. I'm trying to populate a date field that has a start date, end date, time zone and repeat rule components.

The date field's name is field_event_date and it is a rec_date field that has value,end_value, timezone, and rrule as its components.

I have a custom migration source and I'm want to query the DB to populate these values. For now, in testing I'm just putting in a static value in the script like so:

$row->setSourceProperty('value', '2012-03-22T14:30:00');

I've experimented with endless configurations on my YML and can not get any of the date values to populate.

My current YML (which I'm sure is way off) looks like this:

id: event_node
label: Event Nodes
migration_group: custom
source:
  plugin: custom_event_migrate
  target: event
  track_changes: true
destination:
  plugin: entity:node
  bundle: event
process:
  nid: nid
  type:
    plugin: default_value
    default_value: event
  field_event_date:
    -
      plugin: sub_process
      source: field_event_date
      process:
        value: value
        end_value: end_value
        timezone:
          -
            plugin: default_value
            default_value: 'America/Chicago'
3
  • Thank you but I still can't get it working. I can map other, non-date fields, okay but can't figure out how to get the date field setup. I'm using " 'field_event_date/value': value" to map the start date but it is always empty on the node. Nov 25 at 18:41
  • You need to use ` plugin: format_date` for date field Nov 26 at 3:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.