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-20371: Clean up extensions #20730

Merged
merged 8 commits into from
Mar 3, 2025
Merged

Conversation

omahane
Copy link
Contributor

@omahane omahane commented Feb 27, 2025

Description

Relates to #20371

Testing done

Screenshots

QA steps

  • In the terminal, run the following: drush sqlc
  • Run the following: use tugboat
  • Run the following query:
SELECT nfd.nid, nfd.type, nft.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id from paragraph__field_phone_extension as pfpe
JOIN node__field_telephone nft on nft.field_telephone_target_id = pfpe.entity_id
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
JOIN node_field_data nfd on nft.entity_id = nfd.nid
WHERE pfpe.field_phone_extension_value REGEXP '[^0-9]'
UNION
SELECT nfd.nid, nfd.type, pfpn.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id from paragraph__field_phone_extension as pfpe
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
JOIN node__field_phone_numbers_paragraph nfpnp on nfpnp.field_phone_numbers_paragraph_target_id = pfpe.entity_id
JOIN node_field_data nfd on nfpnp.entity_id = nfd.nid
where pfpe.entity_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]')
UNION
SELECT nfd.nid, nfd.type, pfopn.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id FROM paragraph__field_phone_extension as pfpe
JOIN paragraph__field_other_phone_numbers as pfopn on pfopn.field_other_phone_numbers_target_id = pfpe.entity_id
JOIN node__field_service_location nfsl ON pfopn.entity_id = nfsl.field_service_location_target_id
JOIN node_field_data nfd on nfsl.entity_id = nfd.nid
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
where pfopn.field_other_phone_numbers_target_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]')
UNION
SELECT nfd.nid, nfd.type, pfp.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id
FROM paragraph__field_phone_extension as pfpe
JOIN paragraph__field_phone AS pfp on pfp.field_phone_target_id = pfpe.entity_id
LEFT OUTER JOIN node__field_service_location nfsl ON pfp.entity_id = nfsl.field_service_location_target_id
LEFT OUTER JOIN node_field_data nfd on nfsl.entity_id = nfd.nid
JOIN paragraph__field_phone_number pfpn on pfp.field_phone_target_id = pfpn.entity_id
LEFT OUTER JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
where pfp.field_phone_target_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]');
  • Confirm that ~390 extensions are returned.
  • Exit the sqlc with the following command: exit
  • Run the following command in the terminal: drush codit-batch-operations:run RemoveNonNumericalCharactersFromExtensions
  • Run the following command in the terminal: drush codit-batch-operations:run SplitExtensionWithTwoNumbers
  • Check the Codit Batch Operations logs
  • Confirm that the log for "RemoveNonNumericalCharactersFromExtensions" shows the changed extensions and shows which extensions were not changed.
  • Confirm that the log for "SplitExtensionWithTwoNumbers" shows the changed extensions and the ones skipped.

Spot check extensions in the following nodes to confirm that no non-numerical characters are in extensions

  • 46205 (Register for care - Jonathan M. Wainwright Memorial VA Medical Center)
  • 15407 (COVID-19 vaccines - East Orange VA Medical Center)
  • 32519 (Addiction and substance use care - Tucson VA Medical Center)
  • 13059 (My HealtheVet coordinator - James J. Peters Department of Veterans Affairs Medical Center)
  • 66683 (Wheelchair and mobility - West Los Angeles VA Medical Center)

Check for remaining extensions

  • In the terminal, run the following: drush sqlc
  • Run the following: use tugboat
  • Run the following query:
SELECT nfd.nid, nfd.type, nft.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id from paragraph__field_phone_extension as pfpe
JOIN node__field_telephone nft on nft.field_telephone_target_id = pfpe.entity_id
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
JOIN node_field_data nfd on nft.entity_id = nfd.nid
WHERE pfpe.field_phone_extension_value REGEXP '[^0-9]'
UNION
SELECT nfd.nid, nfd.type, pfpn.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id from paragraph__field_phone_extension as pfpe
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
JOIN node__field_phone_numbers_paragraph nfpnp on nfpnp.field_phone_numbers_paragraph_target_id = pfpe.entity_id
JOIN node_field_data nfd on nfpnp.entity_id = nfd.nid
where pfpe.entity_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]')
UNION
SELECT nfd.nid, nfd.type, pfopn.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id FROM paragraph__field_phone_extension as pfpe
JOIN paragraph__field_other_phone_numbers as pfopn on pfopn.field_other_phone_numbers_target_id = pfpe.entity_id
JOIN node__field_service_location nfsl ON pfopn.entity_id = nfsl.field_service_location_target_id
JOIN node_field_data nfd on nfsl.entity_id = nfd.nid
JOIN paragraph__field_phone_number pfpn on pfpe.entity_id = pfpn.entity_id
JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
where pfopn.field_other_phone_numbers_target_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]')
UNION
SELECT nfd.nid, nfd.type, pfp.bundle, nfd.title, pfpl.field_phone_label_value, pfpn.field_phone_number_value, pfpe.field_phone_extension_value, pfpe.entity_id
FROM paragraph__field_phone_extension as pfpe
JOIN paragraph__field_phone AS pfp on pfp.field_phone_target_id = pfpe.entity_id
LEFT OUTER JOIN node__field_service_location nfsl ON pfp.entity_id = nfsl.field_service_location_target_id
LEFT OUTER JOIN node_field_data nfd on nfsl.entity_id = nfd.nid
JOIN paragraph__field_phone_number pfpn on pfp.field_phone_target_id = pfpn.entity_id
LEFT OUTER JOIN paragraph__field_phone_label pfpl on pfpl.entity_id = pfpe.entity_id
where pfp.field_phone_target_id in
(SELECT paragraph__field_phone_extension.entity_id from paragraph__field_phone_extension
WHERE field_phone_extension_value REGEXP '[^0-9]');
  • Confirm that the entity_id of the returned items corresponds with the items in the Codit Batch Operations log for "SplitExtensionWithTwoNumbers" that have the following message: "The phone data from 'field_phone_numbers_paragraph' '$item' on 'health_care_local_health_service' has already been migrated to the Service location paragraph previously. This is a vestigial field that is unused."
  • Confirm that 13 service locations are returned that all have spaces before or after extension. These will need to be manually adjusted.

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

Is this PR blocked by another PR?

  • DO NOT MERGE

Does this PR need review from a Product Owner

  • Needs PO review

CMS user-facing announcement

Is an announcement needed to let editors know of this change?

  • Yes, and it's written in issue ____ and queued for publication.
    • Merge and ping the UX writer so they are ready to publish after deployment
  • Yes, but it hasn't yet been written
    • Don't merge yet -- ping the UX writer to write and queue content
  • No announcement is needed for this code change.
    • Merge & carry on unburdened by announcements

@omahane omahane requested a review from a team as a code owner February 27, 2025 23:16
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 27, 2025 23:16 Destroyed
Copy link

Checking composer.lock changes...

Copy link
Contributor

@dsasser dsasser left a comment

Choose a reason for hiding this comment

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

Early, unrequested feedback...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 00:22 Destroyed
Copy link

Checking composer.lock changes...

@github-actions github-actions bot added the Facilities Facilities products (VAMC, Vet Center, etc) label Feb 28, 2025
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 00:38 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 02:01 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 08:52 Destroyed
@omahane omahane requested a review from dsasser February 28, 2025 12:18
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 12:43 Destroyed
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 16:28 Destroyed
Copy link
Contributor

@dsasser dsasser left a comment

Choose a reason for hiding this comment

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

Code looks good and the QA steps all passed without any errors or notices. I doubled checked the Drupal logs to ensure nothing was intriguing there. Nice work.

Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 18:19 Destroyed
@omahane omahane enabled auto-merge (squash) February 28, 2025 18:55
Copy link

Checking composer.lock changes...

@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 21:31 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 22:27 Destroyed
@omahane omahane disabled auto-merge February 28, 2025 22:47
@va-cms-bot va-cms-bot temporarily deployed to Tugboat February 28, 2025 22:47 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 1, 2025 08:46 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 1, 2025 15:21 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 2, 2025 08:38 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat March 3, 2025 08:36 Destroyed
@omahane omahane enabled auto-merge (squash) March 3, 2025 14:30
Copy link

github-actions bot commented Mar 3, 2025

Checking composer.lock changes...

@va-cms-bot
Copy link
Collaborator

Cypress Accessibility Violations

/test-data-expedita

ID: button-name
Impact: critical
Tags: cat.name-role-value, wcag2a, wcag412, section508, section508.22.a, TTv5, TT6.a, EN-301-549, EN-9.4.1.2, ACT
Description: Ensure buttons have discernible text
Help: Buttons must have discernible text
Nodes:

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Page introduction' field" data-proofing-help="Add an introduction that helps visitors understand if information on the page is relevant to them."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: .field--name-field-intro-text-limited-html > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Generate a table of contents from major headings' field" data-proofing-help="By checking this box, all h2's below this point on the page will be linked with with anchor links. This helps users navigate content on very long pages. Do not check this box unless there is at least 2 h2's on the page.">
    Impact: critical
    Target: .field--name-field-table-of-contents-boolean > .field__label > .proofing-element-help[role="tooltip"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

  • HTML: <button class="proofing-element-help" role="tooltip" data-proofing-help-title="About 'Main content' field" data-proofing-help="The main body of the page, which appears below the featured content."> <span aria-hidden="true">i</span> </button>
    Impact: critical
    Target: button[data-proofing-help-title="About 'Main content' field"]
    Summary: Fix any of the following:
    Element does not have inner text that is visible to screen readers
    aria-label attribute does not exist or is empty
    aria-labelledby attribute does not exist, references elements that do not exist or references elements that are empty
    Element has no title attribute
    Element does not have an implicit (wrapped) <label>
    Element does not have an explicit <label>
    Element's default semantics were not overridden with role="none" or role="presentation"

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