Skip to content

Commit

Permalink
LOYALIST-57 Migrate body value directly
Browse files Browse the repository at this point in the history
  • Loading branch information
JacobSanford committed Jul 12, 2024
1 parent 9e8bebf commit df3cf9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,27 +35,14 @@ process:
bundle_key: vid
bundle: subject_heading
value_key: name
field_other_numbers:
-
plugin: sub_process
source: field_other_numbers_value
process:
value: value
format:
plugin: default_value
default_value: wysiwyg
body:
-
plugin: sub_process
source: body_value
process:
value: value
format:
plugin: default_value
default_value: wysiwyg
summary:
plugin: default_value
default_value: ''
field_other_numbers/value: field_other_numbers_value
field_other_numbers/format:
plugin: default_value
default_value: wysiwyg
body/value: field_contents_value
body/format:
plugin: default_value
default_value: wysiwyg

destination:
plugin: 'entity:node'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public function query()
$query->addField('n', 'nid', 'nid');
$query->addField('n', 'title', 'title');

$query->leftJoin('field_data_body', 'fbody', 'n.vid = fbody.entity_id AND fbody.deleted = 0');
$query->addField('fbody', 'body_value', 'body_value');
$query->leftJoin('field_data_field_contents', 'fcon', 'n.nid = fcon.entity_id AND fcon.deleted = 0');
$query->addField('fcon', 'field_contents_value', 'field_contents_value');

$query->leftJoin('field_data_field_accompanying_record', 'fac', 'n.nid = fac.entity_id AND fac.deleted = 0');
$query->addField('fac', 'field_accompanying_record_value', 'field_accompanying_record_value');
Expand Down Expand Up @@ -62,7 +62,7 @@ public function fields()
'issuing_body_name' => 'issuing_body_name',
'subject_heading_name' => 'subject_heading_name',
'field_other_numbers_value' => 'field_other_numbers_value',
'body_value' => 'body_value',
'field_contents_value' => 'field_contents_value',
];
return $fields;
}
Expand Down

0 comments on commit df3cf9b

Please sign in to comment.