From 09f51dc269580ca3abff6c7038aeda6d669fe1fa Mon Sep 17 00:00:00 2001 From: Christian Burk Date: Thu, 11 Jan 2024 12:40:55 -0600 Subject: [PATCH] VACMS-16522: Move VAMC System pages to restricted_archive workflow (#16779) * VACMS-16522: Changes workflow config to restricted archive * VACMS-16522: Changes form displays to restricted archive * VACMS-16522: Adds hook_update_N for revision db updates --- ...y.node.health_care_region_page.default.yml | 2 +- ...display.node.locations_listing.default.yml | 2 +- ...mc_operating_status_and_alerts.default.yml | 2 +- ....vamc_system_billing_insurance.default.yml | 2 +- ...mc_system_medical_records_offi.default.yml | 2 +- ...node.vamc_system_policies_page.default.yml | 2 +- ....vamc_system_register_for_care.default.yml | 2 +- ...lay.node.vamc_system_va_police.default.yml | 2 +- config/sync/workflows.workflow.editorial.yml | 16 ------------ .../workflows.workflow.restricted_archive.yml | 16 ++++++++++++ .../va_gov_workflow/va_gov_workflow.install | 26 +++++++++++++++++++ 11 files changed, 50 insertions(+), 24 deletions(-) diff --git a/config/sync/core.entity_form_display.node.health_care_region_page.default.yml b/config/sync/core.entity_form_display.node.health_care_region_page.default.yml index f72aca1fde..5a013764e5 100644 --- a/config/sync/core.entity_form_display.node.health_care_region_page.default.yml +++ b/config/sync/core.entity_form_display.node.health_care_region_page.default.yml @@ -26,7 +26,7 @@ dependencies: - field.field.node.health_care_region_page.field_vamc_system_official_name - field.field.node.health_care_region_page.field_youtube - node.type.health_care_region_page - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - content_moderation - field_group diff --git a/config/sync/core.entity_form_display.node.locations_listing.default.yml b/config/sync/core.entity_form_display.node.locations_listing.default.yml index ca779bc275..dfd98c4882 100644 --- a/config/sync/core.entity_form_display.node.locations_listing.default.yml +++ b/config/sync/core.entity_form_display.node.locations_listing.default.yml @@ -10,7 +10,7 @@ dependencies: - field.field.node.locations_listing.field_meta_tags - field.field.node.locations_listing.field_office - node.type.locations_listing - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - content_moderation diff --git a/config/sync/core.entity_form_display.node.vamc_operating_status_and_alerts.default.yml b/config/sync/core.entity_form_display.node.vamc_operating_status_and_alerts.default.yml index 44714eca67..d48cf3b36e 100644 --- a/config/sync/core.entity_form_display.node.vamc_operating_status_and_alerts.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_operating_status_and_alerts.default.yml @@ -14,7 +14,7 @@ dependencies: - field.field.node.vamc_operating_status_and_alerts.field_office - field.field.node.vamc_operating_status_and_alerts.field_operating_status_emerg_inf - node.type.vamc_operating_status_and_alerts - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - content_moderation diff --git a/config/sync/core.entity_form_display.node.vamc_system_billing_insurance.default.yml b/config/sync/core.entity_form_display.node.vamc_system_billing_insurance.default.yml index 47f1152359..2eeb0bdbaa 100644 --- a/config/sync/core.entity_form_display.node.vamc_system_billing_insurance.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_system_billing_insurance.default.yml @@ -17,7 +17,7 @@ dependencies: - field.field.node.vamc_system_billing_insurance.field_phone_number - field.field.node.vamc_system_billing_insurance.field_service_name_and_descripti - node.type.vamc_system_billing_insurance - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - content_moderation diff --git a/config/sync/core.entity_form_display.node.vamc_system_medical_records_offi.default.yml b/config/sync/core.entity_form_display.node.vamc_system_medical_records_offi.default.yml index 2a3cc6f515..bf5bfece83 100644 --- a/config/sync/core.entity_form_display.node.vamc_system_medical_records_offi.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_system_medical_records_offi.default.yml @@ -21,7 +21,7 @@ dependencies: - field.field.node.vamc_system_medical_records_offi.field_service_name_and_descripti - field.field.node.vamc_system_medical_records_offi.field_vamc_med_records_mailing - node.type.vamc_system_medical_records_offi - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - address - allow_only_one diff --git a/config/sync/core.entity_form_display.node.vamc_system_policies_page.default.yml b/config/sync/core.entity_form_display.node.vamc_system_policies_page.default.yml index f0e1275d33..8cf2c8fe1b 100644 --- a/config/sync/core.entity_form_display.node.vamc_system_policies_page.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_system_policies_page.default.yml @@ -15,7 +15,7 @@ dependencies: - field.field.node.vamc_system_policies_page.field_vamc_other_policies - field.field.node.vamc_system_policies_page.field_vamc_visitation_policy - node.type.vamc_system_policies_page - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - content_moderation diff --git a/config/sync/core.entity_form_display.node.vamc_system_register_for_care.default.yml b/config/sync/core.entity_form_display.node.vamc_system_register_for_care.default.yml index 5f48b5cdad..67262f7c82 100644 --- a/config/sync/core.entity_form_display.node.vamc_system_register_for_care.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_system_register_for_care.default.yml @@ -14,7 +14,7 @@ dependencies: - field.field.node.vamc_system_register_for_care.field_office - field.field.node.vamc_system_register_for_care.field_service_name_and_descripti - node.type.vamc_system_register_for_care - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - content_moderation diff --git a/config/sync/core.entity_form_display.node.vamc_system_va_police.default.yml b/config/sync/core.entity_form_display.node.vamc_system_va_police.default.yml index 7f38f10b75..dbd802eb5c 100644 --- a/config/sync/core.entity_form_display.node.vamc_system_va_police.default.yml +++ b/config/sync/core.entity_form_display.node.vamc_system_va_police.default.yml @@ -15,7 +15,7 @@ dependencies: - field.field.node.vamc_system_va_police.field_office - field.field.node.vamc_system_va_police.field_phone_numbers_paragraph - node.type.vamc_system_va_police - - workflows.workflow.editorial + - workflows.workflow.restricted_archive module: - allow_only_one - change_labels diff --git a/config/sync/workflows.workflow.editorial.yml b/config/sync/workflows.workflow.editorial.yml index 1cba2486a1..8f2215978c 100644 --- a/config/sync/workflows.workflow.editorial.yml +++ b/config/sync/workflows.workflow.editorial.yml @@ -20,11 +20,9 @@ dependencies: - node.type.health_care_local_facility - node.type.health_care_local_health_service - node.type.health_care_region_detail_page - - node.type.health_care_region_page - node.type.health_services_listing - node.type.landing_page - node.type.leadership_listing - - node.type.locations_listing - node.type.media_list_images - node.type.media_list_videos - node.type.nca_facility @@ -44,12 +42,6 @@ dependencies: - node.type.support_resources_detail_page - node.type.support_service - node.type.va_form - - node.type.vamc_operating_status_and_alerts - - node.type.vamc_system_billing_insurance - - node.type.vamc_system_medical_records_offi - - node.type.vamc_system_policies_page - - node.type.vamc_system_register_for_care - - node.type.vamc_system_va_police - node.type.vba_facility_service - node.type.vet_center - node.type.vet_center_cap @@ -161,11 +153,9 @@ type_settings: - health_care_local_facility - health_care_local_health_service - health_care_region_detail_page - - health_care_region_page - health_services_listing - landing_page - leadership_listing - - locations_listing - media_list_images - media_list_videos - nca_facility @@ -185,12 +175,6 @@ type_settings: - support_resources_detail_page - support_service - va_form - - vamc_operating_status_and_alerts - - vamc_system_billing_insurance - - vamc_system_medical_records_offi - - vamc_system_policies_page - - vamc_system_register_for_care - - vamc_system_va_police - vba_facility_service - vet_center - vet_center_cap diff --git a/config/sync/workflows.workflow.restricted_archive.yml b/config/sync/workflows.workflow.restricted_archive.yml index 71d33174fd..731793da06 100644 --- a/config/sync/workflows.workflow.restricted_archive.yml +++ b/config/sync/workflows.workflow.restricted_archive.yml @@ -3,7 +3,15 @@ langcode: en status: true dependencies: config: + - node.type.health_care_region_page + - node.type.locations_listing - node.type.service_region + - node.type.vamc_operating_status_and_alerts + - node.type.vamc_system_billing_insurance + - node.type.vamc_system_medical_records_offi + - node.type.vamc_system_policies_page + - node.type.vamc_system_register_for_care + - node.type.vamc_system_va_police - node.type.vba_facility module: - content_moderation @@ -91,6 +99,14 @@ type_settings: weight: 2 entity_types: node: + - health_care_region_page + - locations_listing - service_region + - vamc_operating_status_and_alerts + - vamc_system_billing_insurance + - vamc_system_medical_records_offi + - vamc_system_policies_page + - vamc_system_register_for_care + - vamc_system_va_police - vba_facility default_moderation_state: draft diff --git a/docroot/modules/custom/va_gov_workflow/va_gov_workflow.install b/docroot/modules/custom/va_gov_workflow/va_gov_workflow.install index cad3555269..6edabbda72 100644 --- a/docroot/modules/custom/va_gov_workflow/va_gov_workflow.install +++ b/docroot/modules/custom/va_gov_workflow/va_gov_workflow.install @@ -67,3 +67,29 @@ function va_gov_workflow_update_9001() { $contentType, $oldWorkflow, $newWorklow ); } + +/** + * Change the workflow of the revisions of VAMC system pages. + */ +function va_gov_workflow_update_9002() { + $contentTypes = [ + 'health_care_region_page', + 'locations_listing', + 'vamc_operating_status_and_alerts', + 'vamc_system_billing_insurance', + 'vamc_system_medical_records_offi', + 'vamc_system_policies_page', + 'vamc_system_register_for_care', + 'vamc_system_va_police', + ]; + $message = ''; + foreach ($contentTypes as $contentType) { + $oldWorkflow = 'editorial'; + $newWorkflow = 'restricted_archive'; + $message .= _va_gov_workflow_change_content_type_workflow( + $contentType, $oldWorkflow, $newWorkflow + ) . PHP_EOL; + } + return $message; + +}