department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
97 stars 69 forks source link

Update Drupal UI for Mental health phone number in VAMC Facility content type #17862

Open laflannery opened 5 months ago

laflannery commented 5 months ago

Status

  1. Decide how to format / break down the work in #17861
  2. Update the formatting of this ticket to mirror that

User stories

As an Editor, I want to list the fastest way for a Veteran to reach my department including navigating phone trees with multiple selections required. (Example in the wild: Corpus Christi Mobile Clinic multi-extension MH #.)

As a Veteran, I want phone numbers to be accessible and tappable so that I can dial easily from mobile.

As a DS owner, I want as many phone numbers as possible to use the Design System va-telephone component.

Background

Currently the Mental health phone number field in the VAMC Facility content type is using the Telephone number field type. This is a single field for the editor to enter the phone number information as well as any applicable extension information. However, phone numbers and extensions require specific formatting in order to meet VA guidelines and to display and function properly on the FE.

Description

In order to make it easier for editors to enter their phone number correctly, we want to convert this single Telephone number field to use the Phone paragraph type field, which uses separate fields for the phone and extension.

Additional Notes

### Acceptance Criteria
- [x] Mental Health phone number field on VAMC Facility content type uses the Phone paragraph type
- [x] Label field is hidden in Drupal UI
- [x] Add help text on the Mental health phone number field (that will now be using the paragraph type):

HELPTEXT:

Enter the number Veterans should call to access mental health services at your facility. If your facility doesn't offer these services, enter the most appropriate system number. This number will be displayed everywhere your facility appears across VA.gov. View guidelines for editing VAMC facilities (opens in a new tab)

### Drupal - Field Migration
- [x] Script is written to migrate VAMC Facility Mental health phone numbers from field to paragraph.  Can use https://www.drupal.org/project/codit_batch_operations.
- [x] Cardinality for phone_number paragraph type on  VAMC Facility content type is set to 1
- [x] 'Label' field on phone_number paragraph type is hidden on VAMC Facility content type Node:Edit
- [x] Current`field_phone_number` is hidden but not removed
- [x] Update phone number audit view to display phone paragraph type field AND the Telephone number type field (in order to compare values before and after migration)
- [x] Migration is tested and validated
- [x] This field is pushed to Lighthouse. Update the Facility push for VAMCs to Lighthouse to include the new field in the payload. Send a test push.
  - [ ] Reach out to Adam Stilton in the #cms-lighthouse channel to request they verify the push was received by Lighthouse in their Sandbox environment.
- [x] Manual Code review
- [x] CMS PR is created and approved but not merged
laflannery commented 5 months ago

From this slack thread, there was an instance of an editor adding an incorrectly formatted phone number - they added 855-864-0516press2thenpress5 into the single phone field. The question this has raised is if there is a way to chain extensions and have them dial correctly. Eli suggested that it might be tel:8558640516,2,5 but we aren't positive. We also aren't sure if the component supports multiple extensions

eselkin commented 5 months ago

We aren't even sure if we can provide one extension with a comma already in it to the va-telephone component.

laflannery commented 5 months ago

One extension works when passed properly into the component, using the props as they should be used.

I have confirmed that chained extensions does not work then the href is formatted as href="tel:XXXXXXXXXX,X,X I need to do more research into if this is even possible - regardless of using the component or not because I'm not sure it is

eselkin commented 5 months ago

You can add more commas, like ,2,,,5 sometimes that works. But it looks very ugly and confusing.

eselkin commented 5 months ago

The comma equates to like a 1-2 second pause. But if the system doesn't operate quickly enough then no amount of commas work.

davidmpickett commented 2 months ago

Hey team! Please add your planning poker estimate with Zenhub @dsasser @jv-agile6 @omahane

omahane commented 1 month ago

What about migrating content? I'm not seeing that in the ACs. Hiding the old field? Removing the old field?

jilladams commented 2 weeks ago

PR in progress will target integration branch. Coordination with Lighthouse might roll into Sprint 13.

jilladams commented 5 days ago

I moved this to Complete Pending Integration, since the PR is merged into the integration branch. @omahane pls add notes re: status with lighthouse, when you get a chance.

omahane commented 5 days ago

I have asked LH to confirm that they can receive the new number correctly.

Their validation notwithstanding, a comparison of the queue items from staging and the PR env of the integration branch confirms that the data is identical:

Image

omahane commented 4 days ago

This morning (1 Oct 2024), Adam confirmed the successful receipt of the mental health phone number from the integration branch PR env.

https://dsva.slack.com/archives/C02BTJTDFTN/p1727732511160679