diff --git a/composer.lock b/composer.lock index 7882312512..9f2b88dadb 100644 --- a/composer.lock +++ b/composer.lock @@ -26974,7 +26974,6 @@ "drupal/no_table_drag": 15, "drupal/openapi": 5, "drupal/openapi_ui": 5, - "drupal/paragraphs_features": 10, "drupal/password_strength": 20, "drupal/pathologic": 15, "drupal/prometheus_exporter": 10, diff --git a/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php b/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php index 82134b9fad..3034c72cdd 100644 --- a/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php +++ b/docroot/modules/custom/va_gov_post_api/src/Service/PostFacilityServiceVamc.php @@ -364,7 +364,7 @@ protected function getOnlineScheduling(string $online_scheduling_avail) { 'yes' => 'true', ]; - return $map[$online_scheduling_avail]; + return $map[$online_scheduling_avail] ?? NULL; } /** diff --git a/docroot/modules/custom/va_gov_vamc/src/ServiceLocationMigration.php b/docroot/modules/custom/va_gov_vamc/src/ServiceLocationMigration.php index 7456783943..cc0e300bf3 100644 --- a/docroot/modules/custom/va_gov_vamc/src/ServiceLocationMigration.php +++ b/docroot/modules/custom/va_gov_vamc/src/ServiceLocationMigration.php @@ -189,10 +189,11 @@ protected function migrateScheduleOnline(): void { '1' => 'yes', // 'No' => 'No'. '0' => 'no', - // This is the do no harm, option defaulting to most restrictive. - // 'unspecified' => 'No'. - 'not_applicable' => 'no', - 'default' => 'no', + // This is the do no harm, option defaulting to no choice. + // 'unspecified' => NULL. + '2' => NULL, + 'not_applicable' => NULL, + 'default' => NULL, ]; $lookup = $this->facilityService->get('field_online_scheduling_availabl')->value; $new_value = script_libary_map_to_value($lookup, $schedule_online_map); @@ -211,10 +212,11 @@ protected function migrateWalkinsAccepted(): void { '0' => 'yes_appointment_only', // 'Yes' => 'Yes, with or without an appointment'. '1' => 'yes_with_or_without_appointment', - // This is the do no harm, option defaulting to most restrictive. - // 'unspecified' => 'yes by appointment only'. - 'not_applicable' => 'yes_appointment_only', - 'default' => 'yes_appointment_only', + // This is the do no harm, option defaulting to no choice. + // 'unspecified' => NULL. + '2' => NULL, + 'not_applicable' => NULL, + 'default' => NULL, ]; $lookup = $this->facilityService->get('field_walk_ins_accepted')->value; $new_value = script_libary_map_to_value($lookup, $walkins_accepted_map); diff --git a/scripts/content/script-library.php b/scripts/content/script-library.php index ac00016965..e7d55cca42 100644 --- a/scripts/content/script-library.php +++ b/scripts/content/script-library.php @@ -388,7 +388,7 @@ function script_library_sandbox_complete(array &$sandbox, $completed_message) { * Whatever the value associated with the key. */ function script_libary_map_to_value(string|null $lookup, array $map, bool $strict = TRUE) : mixed { - if (empty($lookup)) { + if (empty($lookup) && strlen($lookup) === 0) { if (isset($map['default'])) { // There is a default set, so use it. return $map['default'];