From 14d2df9eb011e77c0265a528b916bbc511ab3458 Mon Sep 17 00:00:00 2001 From: Noel Chiasson <53783039+nchiasson-dgi@users.noreply.github.com> Date: Fri, 20 Sep 2024 10:41:11 -0300 Subject: [PATCH] Revert "DDST-521: Add status checking with POLICY." --- .../foxml/DgisNodesAlter.php | 51 ------------------- 1 file changed, 51 deletions(-) diff --git a/src/Plugin/dgi_migrate_alter/foxml/DgisNodesAlter.php b/src/Plugin/dgi_migrate_alter/foxml/DgisNodesAlter.php index 70004a9..d4dc105 100644 --- a/src/Plugin/dgi_migrate_alter/foxml/DgisNodesAlter.php +++ b/src/Plugin/dgi_migrate_alter/foxml/DgisNodesAlter.php @@ -84,8 +84,6 @@ public function alter(array &$migration) { 'default_value' => NULL, ]; - $this->processStatusCheck($process); - $process['field_description'][0]['query'] = 'mods:abstract[not(@displayLabel)]'; $process['field_local_contexts'] = $process['field_ismn']; @@ -347,53 +345,4 @@ private function processOrganizationValues(array &$values): void { ]; } - /** - * Changes how the status is set based upon defined conditions. - */ - private function processStatusCheck(array &$process): void { - // The default status behavior is retained as a fallback. - $process['_status'] = $process['status']; - $process['_policy_status'] = [ - [ - 'plugin' => 'dgi_migrate.subindex', - 'source' => '@_node_foxml_parsed', - 'index' => 'POLICY', - 'missing_behaviour' => 'skip_process', - ], - [ - 'plugin' => 'dgi_migrate.subproperty', - 'source' => '@_node_foxml_parsed', - 'property' => 'PID', - ], - [ - 'plugin' => 'explode', - 'delimiter' => ':', - ], - [ - 'plugin' => 'extract', - 'index' => [0], - ], - [ - 'plugin' => 'static_map', - 'map' => [ - 'cmtn' => 0, - 'nwcc' => 0, - 'cotr' => 0, - ], - 'default_value' => NULL, - ], - ]; - // XXX: Unset so it gets re-keyed after the internal fields are made. - unset($process['status']); - $process['status'] = [ - [ - 'plugin' => 'null_coalesce', - 'source' => [ - '@_policy_status', - '@_status', - ], - ], - ]; - } - }