Commit 13deb131 authored by Chris Shantz's avatar Chris Shantz
Browse files

Merge branch '1.0.x' into prod/1.0.x

parents f471fc76 2393133b
......@@ -43,5 +43,5 @@ destination:
plugin: entity:block_content
default_bundle: uw_cbl_call_to_action
migration_dependencies:
required:
optional:
- uw_para_call_to_action
......@@ -42,6 +42,7 @@ process:
uw_ct_news_item: {}
uw_ct_profile: {}
uw_ct_web_page: {}
uw_ct_opportunity: {}
- plugin: uw_dom_inline_image_handler
- plugin: uw_dom_inline_file_handler
- plugin: dom
......@@ -64,3 +65,4 @@ migration_dependencies:
- uw_ct_sidebar
- uw_ct_site_footer
- uw_ct_web_page
- uw_ct_opportunity
......@@ -43,3 +43,4 @@ migration_dependencies:
- uw_ct_news_item
- uw_ct_profile
- uw_ct_web_page
- uw_ct_opportunity
id: uw_body_lb
label: Body to layout builder components
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
source:
plugin: uw_content_complete
table_name: field_data_body
content_column: body_value
fetch_all: true
fields:
- entity_id
- body_value
id_fields:
entity_id:
type: integer
delta:
type: integer
ignore_map: true
process:
nid:
-
plugin: migration_lookup
migration:
- uw_ct_web_page
- uw_ct_blog
- uw_ct_news_item
- uw_ct_event
- uw_ct_profile
source: entity_id
no_stub: true
-
plugin: skip_on_empty
method: row
bid:
plugin: uw_block_lookup
field: body
source: ref_id
section:
plugin: migration_lookup
migration: uw_body_sections_lb
source:
- entity_id
- section
no_stub: true
region: region
default_layout: layout
destination:
plugin: layout_builder:block
migration_dependencies:
optional:
# @todo: Add all content type migrations with body -> layout migration.
- uw_ct_web_page
- uw_ct_blog
- uw_ct_news_item
- uw_ct_event
- uw_ct_profile
- uw_body_sections_lb
# Embedded blocks.
- uw_cbl_copy_text
- uw_cbl_remote_video
- uw_cbl_blockquote
- uw_cbl_google_maps
- uw_cbl_mailman
- uw_cbl_powerbi
- uw_cbl_tableau
- uw_cbl_call_to_action
- uw_cbl_facts_and_figures
- uw_cbl_timeline
- uw_cbl_image_gallery
......@@ -45,4 +45,4 @@ migration_dependencies:
- uw_ct_catalog_item
- uw_web_page
- uw_service
- uw_field_sidebar_content_lb
- uw_layout_builder_components
id: uw_field_body_no_summary_lb
label: Body (field_body_no_summary) to layout builder components
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
source:
plugin: uw_content_complete
table_name: field_data_field_body_no_summary
content_column: field_body_no_summary_value
fetch_all: true
fields:
- entity_id
- field_body_no_summary_value
conditions:
- field: bundle
value: uw_promotional_item
operator: '!='
id_fields:
entity_id:
type: integer
delta:
type: integer
ignore_map: true
process:
nid:
-
plugin: migration_lookup
migration:
- uw_ct_site_footer
source: entity_id
no_stub: true
-
plugin: skip_on_empty
method: row
bid:
plugin: uw_block_lookup
field: field_body_no_summary
source: ref_id
section:
plugin: migration_lookup
migration: uw_field_body_no_summary_sections_lb
source:
- entity_id
- section
no_stub: true
region: region
default_layout: layout
destination:
plugin: layout_builder:block
migration_dependencies:
required:
# @todo: Add all content type migrations with field_body_no_summary -> layout migration.
- uw_ct_site_footer
optional:
- uw_field_body_no_summary_sections_lb
# Embedded blocks.
- uw_cbl_copy_text
- uw_cbl_remote_video
- uw_cbl_blockquote
- uw_cbl_google_maps
- uw_cbl_mailman
- uw_cbl_powerbi
- uw_cbl_tableau
- uw_cbl_call_to_action
- uw_cbl_facts_and_figures
- uw_cbl_timeline
- uw_cbl_image_gallery
......@@ -46,5 +46,5 @@ migration_dependencies:
- uw_field_body_no_summary_promo_item
# This migration should be executed after the normal sidebar migration
# to insert promo items into correct place.
- uw_field_sidebar_content_lb
- uw_layout_builder_components
- uw_cbl_related_links_lb
id: uw_field_body_no_summary_sections_lb
label: Body (field_body_no_summary) to layout builder sections
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
source:
plugin: uw_layout
table_name: field_data_field_body_no_summary
content_column: field_body_no_summary_value
fields:
- entity_id
- field_body_no_summary_value
conditions:
- field: bundle
value: uw_promotional_item
operator: '!='
id_fields:
entity_id:
type: integer
delta:
type: integer
ignore_map: true
process:
nid:
-
plugin: migration_lookup
migration:
- uw_ct_site_footer
source: entity_id
no_stub: true
-
plugin: skip_on_empty
method: row
message: 'Destination node was not found.'
layout: layout
layout_settings: layout_settings
section: delta
destination:
plugin: layout_builder:section
migration_dependencies:
required:
- uw_ct_site_footer
id: uw_field_sidebar_content_lb
label: Sidebar content to layout builder components
id: uw_layout_builder_components
label: Layout builder components
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
deriver: Drupal\uw_migrate\Plugin\migrate\UwLayoutBuilderDeriver
source:
plugin: uw_content_complete
table_name: field_data_field_sidebar_content
content_column: field_sidebar_content_value
fetch_all: true
fields:
- entity_type
- bundle
- entity_id
- field_sidebar_content_value
id_fields:
entity_id:
type: integer
......@@ -26,9 +22,8 @@ process:
nid:
-
plugin: migration_lookup
migration:
- uw_ct_sidebar
- uw_ct_sidebar_promo
# A list of migrations is added in deriver class.
migration: placeholder
source: entity_id
no_stub: true
-
......@@ -36,20 +31,25 @@ process:
method: row
bid:
plugin: uw_block_lookup
field: field_sidebar_content
source: ref_id
section:
plugin: migration_lookup
source:
- entity_id
- section
no_stub: true
region:
plugin: default_value
source: region
default_value: 'first'
default_layout:
plugin: default_value
source: layout
default_value: 'uw_1_column'
destination:
plugin: layout_builder:block
migration_dependencies:
optional:
- uw_ct_sidebar
- uw_ct_sidebar_promo
# Embedded blocks.
- uw_cbl_copy_text
- uw_cbl_remote_video
......
id: uw_layout_builder_profile_list
label: Profile listing blocks
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
source:
plugin: uw_node
node_type: uwaterloo_custom_listing
batch_size: 200
process:
nid:
- plugin: migration_lookup
migration: uw_ct_web_page
source: nid
no_stub: true
- plugin: skip_on_empty
method: row
configuration/id:
plugin: default_value
default_value: 'uw_cbl_profiles_manual'
configuration/label: title
configuration/provider:
plugin: default_value
default_value: 'uw_custom_blocks'
configuration/label_display:
plugin: default_value
default_value: 0
configuration/profile_ids:
plugin: sub_process
source: field_anchor_entity_reference
include_source: true
process:
id:
plugin: migration_lookup
migration: uw_ct_profile
source: target_id
no_stub: true
weight:
plugin: callback
callable: uw_migrate_get_item_delta
source:
- target_id
- source/field_anchor_entity_reference
configuration/num_profile_ids:
- plugin: single_value
source: field_anchor_entity_reference
- plugin: callback
callable: count
region:
plugin: default_value
default_value: 'first'
default_layout:
plugin: default_value
default_value: 'uw_1_column'
destination:
plugin: layout_builder:block
migration_dependencies:
optional:
- uw_ct_web_page
- uw_ct_profile
- uw_layout_builder_components
id: uw_body_sections_lb
label: Body to layout builder sections
id: uw_layout_builder_sections
label: Layout builder sections
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Layout Builder
deriver: Drupal\uw_migrate\Plugin\migrate\UwLayoutBuilderDeriver
source:
plugin: uw_layout
table_name: field_data_body
content_column: body_value
fields:
- entity_id
- body_value
id_fields:
entity_id:
type: integer
......@@ -21,18 +19,12 @@ source:
ignore_map: true
process:
nid:
-
plugin: migration_lookup
migration:
- uw_ct_web_page
- uw_ct_blog
- uw_ct_news_item
- uw_ct_event
- uw_ct_profile
- plugin: migration_lookup
# A list of migrations is added in deriver class.
migration: placeholder
source: entity_id
no_stub: true
-
plugin: skip_on_empty
- plugin: skip_on_empty
method: row
message: 'Destination node was not found.'
layout: layout
......@@ -41,9 +33,4 @@ process:
destination:
plugin: layout_builder:section
migration_dependencies:
optional:
- uw_ct_web_page
- uw_ct_blog
- uw_ct_news_item
- uw_ct_event
- uw_ct_profile
optional: {}
......@@ -11,9 +11,9 @@ source:
plugin: uw_file
scheme: public
batch_size: 200
# @todo: Verify the fields list.
fields:
- field_file
- field_file_opportunities
properties:
- description
process:
......
......@@ -20,6 +20,7 @@ source:
- field_contact_image
- field_profile_photo
- field_uw_image_gallery_images
- field_image_opportunities
properties:
- alt
- title
......
......@@ -21,6 +21,15 @@ process:
from_format: 'Y-m-d\TH:i:s'
to_format: 'Y-m-d'
source: value
field_uw_audience:
plugin: sub_process
source: field_audience
process:
target_id:
plugin: migration_lookup
migration: uw_taxonomy_term
source: tid
no_stub: true
field_uw_blog_tags:
plugin: migration_lookup
migration: uw_taxonomy_term
......
......@@ -32,6 +32,15 @@ process:
field_uw_event_location_coord:
plugin: location_to_geofield
source: field_event_location
field_uw_audience:
plugin: sub_process
source: field_audience
process:
target_id:
plugin: migration_lookup
migration: uw_taxonomy_term
source: tid
no_stub: true
field_uw_event_type:
plugin: migration_lookup
migration: uw_taxonomy_term
......
......@@ -37,6 +37,15 @@ process:
field_uw_news_summary/format:
plugin: uw_formats
source: body/0/format
field_uw_audience:
plugin: sub_process
source: field_audience
process:
target_id:
plugin: migration_lookup
migration: uw_taxonomy_term
source: tid
no_stub: true
field_uw_meta_description:
plugin: uw_summary
trimmed: true
......
id: uw_ct_opportunity
label: Opportunity
migration_group: uw
audit: true
migration_tags:
- Drupal 7
- Content
- Node
source:
plugin: uw_node
node_type: uw_opportunities
batch_size: 200
process:
title: title
_field_opportunity_type_name:
plugin: static_map
source: field_opportunity_type
map:
1: Paid
2: Volunteer
3: 'Research participant'
field_uw_opportunity_type:
plugin: entity_lookup
source: '@_field_opportunity_type_name'
entity_type: taxonomy_term
bundle: uw_vocab_opportunity_type
value_key: name
bundle_key: vid
access_check: false
_field_employment_type_name:
plugin: static_map
source: field_employment_type
map:
1: 'Full time'
2: 'Part time'
field_uw_opportunity_employment:
plugin: entity_lookup
source: '@_field_employment_type_name'
entity_type: taxonomy_term
bundle: uw_vocab_opportunity_employment
value_key: name
bundle_key: vid
access_check: false
field_uw_opportunity_pay_rate: field_rate_of_pay
_field_rate_of_pay_type:
plugin: static_map
source: field_rate_of_pay_type
map:
1: 'Honorarium'
2: 'Hourly'
3: 'Salary'
4: 'USG'
field_uw_opportunity_pay_type:
plugin: entity_lookup
source: '@_field_rate_of_pay_type'
entity_type: taxonomy_term
bundle: uw_vocab_opportunity_payrate
value_key: name
bundle_key: vid
access_check: false
field_uw_opportunity_job_id: field_job_id
field_uw_opportunity_post_by: field_posted_by
field_uw_opportunity_date:
plugin: sub_process
source: field_date_posted
process:
value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: value
field_uw_opportunity_deadline:
plugin: sub_process
source: field_applicaton_deadline
process:
value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d\TH:i:s'
source: value
field_uw_opportunity_start_date:
plugin: sub_process
source: field_start_date
process:
value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: value
field_uw_opportunity_end_date:
plugin: sub_process
source: field_end_date
process:
value:
plugin: format_date
from_format: 'Y-m-d H:i:s'
to_format: 'Y-m-d'
source: value
field_uw_opportunity_pos_number:
plugin: static_map
source: field_number_of_positions
map:
11: '10+'
bypass: TRUE
field_uw_opportunity_report: field_reports_to
field_uw_opportunity_link: field_link_to_application/0/value
field_uw_meta_description:
plugin: uw_summary
trimmed: true