Skip to content

Commit

Permalink
VACMS-16522: Move VAMC System pages to restricted_archive workflow (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
omahane authored Jan 11, 2024
1 parent 527788d commit 09f51dc
Show file tree
Hide file tree
Showing 11 changed files with 50 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 0 additions & 16 deletions config/sync/workflows.workflow.editorial.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
16 changes: 16 additions & 0 deletions config/sync/workflows.workflow.restricted_archive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
26 changes: 26 additions & 0 deletions docroot/modules/custom/va_gov_workflow/va_gov_workflow.install
Original file line number Diff line number Diff line change
Expand Up @@ -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;

}

0 comments on commit 09f51dc

Please sign in to comment.