popsu_migrate: D7NodeActu ok

This commit is contained in:
2021-04-21 11:59:10 +02:00
parent 3ad0c731f9
commit c1b92143ef
23 changed files with 598 additions and 208 deletions

View File

@@ -0,0 +1,121 @@
id: d7_node_actu
label: Node actu
migration_group: popsu
audit: true
migration_tags:
- Drupal 7
- Content
- Popsu
source:
plugin: d7_node_actu
batch_size: 500
# high_water_property:
# name: changed
# alias: n
destination:
plugin: entity:node
process:
# nid: nid
type:
plugin: default_value
default_value: actualite
created: created
changed: changed
uid:
plugin: default_value
default_value: 34
title: title
field_sous_titre: field_popsu_actu_soustitre
promote:
plugin: default_value
default_value: 0
source: field_popsu_actu_enhome
# https://understanddrupal.com/articles/migrating-dates-drupal
# 'field_date/value':
# plugin: format_date
# source: field_popsu_actu_date
# from_format: 'Y-m-j H:i:s'
# to_format: 'Y-m-d\TH:i:s'
# 'field_date/end_value':
# plugin: format_date
# source: field_popsu_actu_date_fin
# from_format: 'Y-m-j H:i:s'
# to_format: 'Y-m-d\TH:i:s'
field_dates_actu:
-
plugin: skip_on_empty
method: process
source: field_date
-
plugin: sub_process
# source: field_date
process:
value:
# format_date was not working, converting date to timestamp on prepare_row
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d\TH:i:s'
# \TH:i:s
source: value
end_value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d\TH:i:s'
source: end
# duration: duration
timezone:
plugin: default_value
default_value: ""
# settings:
# validate_format: false
body:
plugin: sub_process
source: field_popsu_actu_body
process:
value: value
summary: summary
format:
plugin: default_value
default_value: wysiwyg
field_fichier:
plugin: sub_process
source: field_popsu_actu_attachment
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
display: display
description: description
field_image:
plugin: sub_process
source: field_popsu_actu_image
process:
target_id:
plugin: migration_lookup
migration: d7_allpublicfiles
source: fid
no_stub: true
alt: alt
title: title
field_memo: field_memo
migration_dependencies:
required:
- d7_allpublicfiles

View File

@@ -107,5 +107,3 @@ process:
migration_dependencies:
required:
- d7_allpublicfiles
- d7_users
- d7_taxonomy_term_type_theme