X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fcomment%2Fmigration_templates%2Fd6_comment_field_instance.yml;fp=web%2Fcore%2Fmodules%2Fcomment%2Fmigration_templates%2Fd6_comment_field_instance.yml;h=741ccf2e915e481df81d627e077bd22b33c2a487;hp=d708619e1e0d74dd02d3967af3fa0d846166f55f;hb=9917807b03b64faf00f6a1f29dcb6eafc454efa5;hpb=aea91e65e895364e460983b890e295aa5d5540a5 diff --git a/web/core/modules/comment/migration_templates/d6_comment_field_instance.yml b/web/core/modules/comment/migration_templates/d6_comment_field_instance.yml index d708619e1..741ccf2e9 100644 --- a/web/core/modules/comment/migration_templates/d6_comment_field_instance.yml +++ b/web/core/modules/comment/migration_templates/d6_comment_field_instance.yml @@ -3,7 +3,7 @@ label: Comment field instance configuration migration_tags: - Drupal 6 source: - plugin: d6_comment_variable + plugin: d6_node_type constants: entity_type: node label: Comments @@ -13,13 +13,24 @@ process: label: 'constants/label' required: 'constants/required' field_name: + - + plugin: migration_lookup + source: type + migration: d6_comment_type + - + plugin: skip_on_empty + method: row + bundle: type + 'default_value/0/status': + # We're using static_map instead of default_value otherwise if the source + # is 0, the default value of 1 would be used. plugin: static_map - source: comment_subject_field - default_value: comment + source: comment map: - 0: comment_no_subject - bundle: node_type - 'default_value/0/status': comment + 0: 0 + 1: 1 + 2: 2 + default_value: 2 'settings/default_mode': plugin: static_map source: comment_default_mode @@ -32,13 +43,31 @@ process: 3: 1 # COMMENT_MODE_THREADED_EXPANDED --> COMMENT_MODE_THREADED 4: 1 - 'settings/per_page': comment_default_per_page - 'settings/anonymous': comment_anonymous - 'settings/form_location': comment_form_location - 'settings/preview': comment_preview + default_value: 1 + 'settings/per_page': + plugin: default_value + source: comment_default_per_page + default_value: 50 + 'settings/anonymous': + plugin: default_value + source: comment_anonymous + default_value: 0 + 'settings/form_location': + plugin: default_value + source: comment_form_location + default_value: 0 + 'settings/preview': + # We're using static_map instead of default_value otherwise if the source + # is 0, the default value of 1 would be used. + plugin: static_map + source: comment_preview + map: + 0: 0 + 1: 1 + default_value: 1 destination: plugin: entity:field_config migration_dependencies: required: - - d6_comment_field - d6_node_type + - d6_comment_field