Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VACMS-15422: Makes Vet Center - Outstation names more like Vet Center #15716

Merged
merged 5 commits into from
Oct 24, 2023

Conversation

omahane
Copy link
Contributor

@omahane omahane commented Oct 18, 2023

Description

Relates to #15422

This PR creates the field on the Vet Center - Outstation and sets the migration configuration and presave to put the official name in the title. After deploy, the new script (scripts/content/VACMS-15422-vet-center-outstation-copy-title.php) will need to be run in production.

Testing done

Manually

Screenshots

node:edit as an admin

Screenshot 2023-10-20 at 12 18 12 PM

node:edit as an editor

Screenshot 2023-10-20 at 12 27 08 PM

QA steps

In the browser

Delete a current Vet Center - Outstation

Delete a current Vet Center

In the Terminal

Restore "Keene Vet Center Outstation" by migration

  • In the terminal, enter the following: drush migrate:import va_node_facility_vet_centers_os --update --idlist=vc_1221OS

Restore "Henderson Vet Center" by migration

  • In the terminal, enter the following: drush migrate:import va_node_facility_vet_centers --update --idlist=vc_0534V

In the browser

Verify the "Keene Vet Center Outstation" migration

  • As an admin, verify the migration of Keene Vet Center Outstation
    • Confirm that the Name of Vet Center - Oustation is set to "Keene Vet Center Outstation"
    • Confirm that the Common name is set to "Keene Vet Center Outstation"

Verify the "Henderson Vet Center" migration

  • As an admin, verify the migration of Henderson Vet Center
    • Confirm that the Name of Vet Center - Oustation is set to "Henderson Vet Center"
    • Confirm that the Common name is set to "Henderson Vet Center"

In the terminal

Update the Vet Center - Outstation names via a script

  • In the terminal, enter the following: drush scr ./scripts/content/VACMS-15422-vet-center-outstation-copy-title.php

In the browser

Confirm the Vet Center - Outstation script's changes on previously migrated nodes

  • As an admin, go to the Recent log messages.
  • Confirm that a log message from Vet Center - Outstation describes updating the nodes.
  • Go to Major Brent Taylor Vet Center Outstation
  • Confirm that the title is "Major Brent Taylor Vet Center Outstation"
  • Confirm that the Vet Center - Outstation name is "Major Brent Taylor Vet Center Outstation"
  • Click the Edit tab
  • Confirm that the Vet Center - Outstation name is disabled and cannot be edited.
  • Confirm that the Common name can be edited by changing the name to "Ogden Vet Center Outstation"
  • Save the node
  • Confirm that the page title has changed to "Odgen Vet Center Outstation"

Review a Vet Center - Outstation with different common and official names as an editor

  • As QA Vet Center Editor, go to Major Brent Taylor Vet Center Outstation
  • Confirm that the page title is to "Odgen Vet Center Outstation"
  • Click the Edit tab
  • Confirm that the Vet Center - Outstation name is disabled and cannot be edited.
  • Confirm that the Common name can be edited by changing the name to "Ogden Vet Center Outstation"

Review a Vet Center - Outstation with the same common and official names as an editor

  • As QA Vet Center Editor, go to Keene Vet Center Outstation
  • Confirm that the page title is "Keene Vet Center Outstation"
  • Confirm that the Vet Center - Outstation name is "Keene Vet Center Outstation"
  • Click the Edit tab
  • Confirm that the Vet Center - Outstation name is disabled and cannot be edited.
  • Confirm that the Vet Center - Outstation name is "Keene Vet Center Outstation"
  • Confirm that the Common name is not visible (as is expected because the common name and official name is the same)

Definition of Done

  • Documentation has been updated, if applicable.
  • Tests have been added if necessary.
  • Automated tests have passed.
  • Code Quality Tests have passed.
  • Acceptance Criteria in related issue are met.
  • Manual Code Review Approved.
  • If there are field changes, front end output has been thoroughly checked.

Select Team for PR review

  • CMS Team
  • Public websites
  • Facilities
  • User support
  • Accelerated Publishing

@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 18, 2023 18:26 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 18, 2023 21:18 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 18, 2023 21:24 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 19, 2023 11:23 Destroyed
@github-actions github-actions bot added the Facilities Facilities products (VAMC, Vet Center, etc) label Oct 19, 2023
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 19, 2023 21:32 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 19, 2023 21:36 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 19, 2023 22:47 Destroyed
@omahane omahane force-pushed the VACMS-15422-vet-center-outstation-common-name branch from 100b6c4 to c3bf9ea Compare October 20, 2023 15:32
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 20, 2023 15:32 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 20, 2023 15:41 Destroyed
@omahane omahane force-pushed the VACMS-15422-vet-center-outstation-common-name branch from c3bf9ea to 9a13781 Compare October 20, 2023 16:25
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 20, 2023 16:25 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 20, 2023 16:33 Destroyed
@omahane omahane requested a review from swirtSJW October 20, 2023 17:31
@omahane omahane force-pushed the VACMS-15422-vet-center-outstation-common-name branch from 9a13781 to c4d73dd Compare October 23, 2023 21:22
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 23, 2023 21:22 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 24, 2023 04:20 Destroyed
@omahane omahane force-pushed the VACMS-15422-vet-center-outstation-common-name branch from 1723a3c to 092ea65 Compare October 24, 2023 10:39
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 24, 2023 10:44 Destroyed
Copy link
Contributor

@swirtSJW swirtSJW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works great. Well done. Great testing steps as always.
image

image

image

image

image

image

image

* Status message.
*/
function va_gov_copy_vet_center_os_title(array &$sandbox, $revision_message) {
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$node_storage = \Drupal::entityTypeManager()->getStorage('node');
$node_storage = get_node_storage();

Minor: Existing patterns.

@swirtSJW
Copy link
Contributor

image

@swirtSJW swirtSJW force-pushed the VACMS-15422-vet-center-outstation-common-name branch from 092ea65 to 5a78f4d Compare October 24, 2023 16:46
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 24, 2023 16:46 Destroyed
@swirtSJW swirtSJW merged commit 7ba0d47 into main Oct 24, 2023
13 checks passed
@swirtSJW swirtSJW deleted the VACMS-15422-vet-center-outstation-common-name branch October 24, 2023 16:46
chri5tia pushed a commit that referenced this pull request Oct 25, 2023
…#15716)

* VACMS-15422: Makes outstations more like vet centers

* VACMS-15422: Migration config and code updated for title and official name.

* VACMS-15422: Reverts revision log

* VACMS-15422: Removes install file. We need to the config first.

* VACMS-15422: Adds script for updating facilities in prod.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Facilities Facilities products (VAMC, Vet Center, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants