id: d7_node_theme
label: Node Theme
migration_group: popsu
audit: true
migration_tags:
  - Drupal 7
  - Content
  - Popsu

source:
  plugin: d7_node_theme
  # node_type: popsu_special
  batch_size: 500
  # high_water_property:
  #   name: changed
  #   alias: n

destination:
  plugin: entity:node

process:
  # nid: nid
  type:
    plugin: default_value
    default_value: theme
  created: created
  changed: changed

  uid:
    plugin: default_value
    default_value: 34

  title: title

  field_programme:
    plugin: migration_lookup
    migration: d7_node_programme
    source: programme
    no_stub: true

  field_image:
    plugin: sub_process
    source: images
    process:
      target_id:
        plugin: migration_lookup
        migration: d7_allpublicfiles
        source: fid
        no_stub: true
      alt: alt
      title: title

  field_type_de_theme:
    plugin: migration_lookup
    migration: d7_taxonomy_term_type_theme
    source: field_popsu_themtrans_type
    no_stub: true

  field_themes_lies:
    plugin: sub_process
    source: field_themes_lies
    process:
      target_id:
        plugin: migration_lookup
        migration: d7_node_theme
        source: nid

  field_projets_lies:
    plugin: sub_process
    source: field_projets_lies
    process:
      target_id:
        plugin: migration_lookup
        migration: d7_node_projet
        source: nid

  field_textes: field_textes

  field_equipes: field_equipes

  field_partenaires: field_partenaires

  field_memo: field_memo

migration_dependencies:
  required:
    - d7_allpublicfiles
    - d7_users
    - d7_taxonomy_term_type_theme
    # - d7_node_projet
