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

Drupal: back end changes and associated tests for Address module upgrade to version 2 #17191

Closed
4 tasks done
xiongjaneg opened this issue Feb 9, 2024 · 21 comments
Closed
4 tasks done
Assignees
Labels
Drupal engineering CMS team practice area Facilities Facilities products (VAMC, Vet Center, etc) Regional office CMS managed VBA product owned by the Facilities team sitewide VAMC CMS managed product owned by Facilities team Vet Center CMS managed product owned by Facilities team

Comments

@xiongjaneg
Copy link
Contributor

xiongjaneg commented Feb 9, 2024

Description

This is part 2 of the Address module upgrade to version 2

In part 1 #14083, the work was done to review the release notes and upgrade the module in an integration branch while determining exactly what additional changes need to happen (i.e. the facility migrations, graphql queries, front end templates, and any additional changes found after performing the upgrade).

This ticket is for the back end changes along with any associated tests that should be added to the integration branch (separate ticket that is populated with the findings of this ticket).

This precedes part 3, the front end changes along with any associated tests should be added to the integration branch (another separate ticket that is populated with the findings of this ticket).

Additional information

The Address module is inline to release a 2.0 version of the module.
image

Possible issues (just for advanced planning)

  1. One of the updates to 2.0 is the addition of the address line 3. (current version only has two) In our facility migrations, lighthouse provides three lines of data and we concatenate the lines 2 &3 to get them to fit into CMS line 2. We would need to remove that concatenation from our facility migrations.
    • Changes would need to be made to the GraphQL queries and FE templates
    • This change would need to be accounted for in our push to LH of Vet Center CAPs and VBA(? if we are source of truth by then)

Back end changes

  • Update the Address Field to set the override for 'Address line 3' to hidden for the content types using it:
    • Event: set to optional (see consideration below)
    • News Release: set to hidden
    • VAMC Facility: set to hidden (see consideration below)
    • Vet Center: set to optional
    • Vet Center - Community Access Point: set to optional
    • Vet Center - Outstation: set to optional
    • Vet Center - Mobile Vet Center: set to optional
    • VBA Facility: set to hidden (see consideration below)
    • NCA Facility: set to optional
  • Update the Address Field to set the override for line 3 to hidden for the paragraphs using it:
    • Service location address: set to optional
  • Update migrations to use the 3rd field where applicable:
    • Vet Center: address3 from the source can now go to address_line3 rather than being combined with address2
    • Vet Center - Outstation: address3 from the source can now go to address_line3 rather than being combined with address2
    • Vet Center - Mobile Vet Center: address3 from the source can now go to address_line3 rather than being combined with address2
    • NCA Facility: address3 from the source can now go to address_line3 rather than being combined with address2
  • Update Post API to use address_line3.
  • Consideration: Currently VAMC Facilities and VBA Facilities are migrating all 3 address lines into just 1 address line. Should this continue? If so then no additional things need to change. If not, then those content types will need adjustment as well.
  • Consideration: Events live outside of Facilities. I don't think this would have too much affect on them in regards to the back end (just a config change), but there will need to be graphql and template changes on the frontend if the 3rd line is set as optional as indicated above. Otherwise the 3rd line should be set as hidden if it is determined to not be wanted/needed.

Acceptance criteria

  • Back end changes and associated tests are added to the integration branch
  • Update Front end changes and associated tests for Address module upgrade to version 2  #17193 with the findings of this ticket No longer needed based on decision to hide line 3
  • Acceptance by PW/CMS teams before merge (PMs notified in Slack and comment in this ticket, Drupal engineers approved in PR)
  • PM is tagged for communication with VHA DM and editors Not needed based on decision to hide line 3
@xiongjaneg xiongjaneg added the Needs refining Issue status label Feb 9, 2024
@xiongjaneg xiongjaneg added VAMC CMS managed product owned by Facilities team Drupal engineering CMS team practice area Facilities Facilities products (VAMC, Vet Center, etc) Regional office CMS managed VBA product owned by the Facilities team Vet Center CMS managed product owned by Facilities team labels Feb 9, 2024
@mmiddaugh
Copy link
Contributor

@xiongjaneg after chatting with Dave C I added the following AC to the description above (in efforts to move toward a consistent and repeatable process for teams working in CMS)

Tugboat environment is available for testing by Public Websites and CMS (and availability has been communicated)

@EWashb for your awareness

@xiongjaneg
Copy link
Contributor Author

@FranECross for your awareness

@FranECross
Copy link

@xiongjaneg I created a testing ticket for the PW team, and also added your epic to it for visibility. Thanks! cc @dsasser @jilladams

@xiongjaneg
Copy link
Contributor Author

All three address lines should be enabled.

@FranECross
Copy link

@xiongjaneg For our sprint planning purposes, when do you estimate this will be ready for the PW team to test? Thanks in advance! cc @jilladams @dsasser

@xiongjaneg
Copy link
Contributor Author

@FranECross We'll get it into Sprint 105 so sometime that sprint, PW will get tagged on the PR to review in Tugboat. How does that sound?

@xiongjaneg xiongjaneg removed the Needs refining Issue status label Feb 22, 2024
@FranECross
Copy link

@xiongjaneg Sounds perfect! Thanks so much for the quick response.

@omahane
Copy link
Contributor

omahane commented Feb 23, 2024

@laflannery @thejordanwood I'm interested in your feelings about the addition of this line in the address. The upgraded module has two additional lines, compared to one additional in the current version. This makes the UI feel a little bare without any label, but I'd like to know what you think.
Screenshot 2024-02-23 at 9 26 22 AM

@laflannery
Copy link
Contributor

@omahane I'm not a huge fan. They do have sr-only labels but I do think some direction here would really help. Actually showing the labels I'm not sure how much help that would provide, because the labels are just "Street address line 2" and "Street address line 3". My preference would probably be to provide help text to let editors know what each field would be for. Is that an option?

@omahane
Copy link
Contributor

omahane commented Feb 23, 2024

My preference would probably be to provide help text to let editors know what each field would be for. Is that an option?

We can definitely look at that as a part of this ticket.

@laflannery
Copy link
Contributor

Do you know where we could add the help text? would it be general text right under "Street address" or is adding individual text for each field a possibility? I'm saying saying I necessarily want to do that I'm jut exploring my options

@Becapa Becapa self-assigned this Feb 27, 2024
@Becapa
Copy link
Contributor

Becapa commented Feb 28, 2024

To be able to add help text via the UI (config), it looks like it only allows us to add it to the entire Address widget. So I think in the example above it would show the help text just above the 'Country' drop-down. However, we should be able to add help text to any field with code via form alters. I think the drawback to this is that the text is then hard-coded (potentially in multiple spots in the code-base) and a bit more difficult to find and change if needed.

@laflannery
Copy link
Contributor

I talked with Jordan - Is it possible to just not display the 3rd address line? We don't see a reason why editors would need this and the more flexibility we give editors, the more they are going to ad extra and unnecessary information. There is also a chance they may think it's required, given the way that this is set up.

If that's possible, that seems like the best option. Then we think the CMS team should handle a more overall, better experience for help text/labelling/etc. since they are technically owners of the module

@Becapa
Copy link
Contributor

Becapa commented Feb 29, 2024

It is possible to hide the 3rd line, and this would actually simplify a lot of the work, since it's basically just making it work the same way it already was. There are instances where the data from the API has 3 lines of data and we have been concatenating that into 1 or 2 lines because there was no option of a 3rd line before. I don't think I see any issues with continuing that but would like to talk about it with everyone during a 16th minute if possible.

@xiongjaneg
Copy link
Contributor Author

@Becapa Not sure we'll have the people we want at 16th minute to discuss. I'll tag @davidmpickett to add to UX sync.

@omahane
Copy link
Contributor

omahane commented Feb 29, 2024

Sample data from the Facilities API

137 of 306 facilities with an address_3 entry also have address_2: null

The others should give you an idea of how the address_3 field is being used upstream.

"properties": {
                "id": "vha_402GA",
                "name": "Caribou VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Primary Care CBOC",
                "website": "https://www.va.gov/maine-health-care/locations/caribou-va-clinic/",
                "time_zone": "America/New_York",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "04736-3567",
                        "city": "Caribou",
                        "state": "ME",
                        "address_1": "163 Van Buren Road",
                        "address_2": null,
                        "address_3": "Suite 6"
                    }
                },
                },
                "properties": {
                "id": "vha_405HE",
                "name": "Keene VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Primary Care CBOC",
                "website": "https://www.va.gov/white-river-junction-health-care/locations/keene-va-clinic/",
                "time_zone": "America/New_York",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "03431-4049",
                        "city": "Keene",
                        "state": "NH",
                        "address_1": "640 Marlboro Street",
                        "address_2": "Curran Building",
                        "address_3": "Route 101"
                    }
                },
                },
                "properties": {
                "id": "vha_608BY",
                "name": "Concord VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Other Outpatient Services (OOS)",
                "website": "https://www.va.gov/manchester-health-care/locations/concord-va-clinic/",
                "time_zone": "America/New_York",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "03301-5071",
                        "city": "Concord",
                        "state": "NH",
                        "address_1": "60 Commercial Street",
                        "address_2": "Concord Ambulatory Surgery Center at Horseshoe Pond",
                        "address_3": "Suite 301"
                    }
                },
                },
                "properties": {
                "id": "vha_631QA",
                "name": "Plantation Street VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Other Outpatient Services (OOS)",
                "website": "https://www.va.gov/central-western-massachusetts-health-care/locations/plantation-street-va-clinic/",
                "time_zone": "America/New_York",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "01605-2300",
                        "city": "Worcester",
                        "state": "MA",
                        "address_1": "377 Plantation Street",
                        "address_2": "Biotech",
                        "address_3": "Building 4"
                    }
                },
                },
                "properties": {
                "id": "vha_580GK",
                "name": "Kingwood VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Other Outpatient Services (OOS)",
                "website": "https://www.va.gov/houston-health-care/locations/kingwood-va-clinic/",
                "time_zone": "America/Chicago",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "77338-3965",
                        "city": "Humble",
                        "state": "TX",
                        "address_1": "1485 FM 1960 Bypass Road East",
                        "address_2": "Humble Medical Plaza",
                        "address_3": "Suite 340"
                    }
                },
                },
                "properties": {
                "id": "vha_671GV",
                "name": "North East Bexar VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Primary Care CBOC",
                "website": null,
                "time_zone": "America/Chicago",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "78217-5675",
                        "city": "San Antonio",
                        "state": "TX",
                        "address_1": "2391 Northeast Loop 410",
                        "address_2": "Marymont Business Park",
                        "address_3": "Suite 309"
                    }
                },
                },
                "properties": {
                "id": "vha_575GB",
                "name": "Major William Edward Adams Department of Veterans Affairs Clinic",
                "facility_type": "va_health_facility",
                "classification": "Other Outpatient Services (OOS)",
                "website": "https://www.va.gov/western-colorado-health-care/locations/major-william-edward-adams-department-of-veterans-affairs-clinic/",
                "time_zone": "America/Denver",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "81625-2945",
                        "city": "Craig",
                        "state": "CO",
                        "address_1": "1111 West Victory Way",
                        "address_2": "Centennial Mall",
                        "address_3": "Suite 116"
                    }
                },
                },
                "properties": {
                "id": "vha_635QE",
                "name": "Tinker VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Other Outpatient Services (OOS)",
                "website": "https://www.va.gov/oklahoma-city-health-care/locations/tinker-va-clinic/",
                "time_zone": "America/Chicago",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "73145-8716",
                        "city": "Tinker AFB",
                        "state": "OK",
                        "address_1": "7050 Air Depot",
                        "address_2": "72nd Medical Group",
                        "address_3": "Suite 1094"
                    }
                },
                },
                "properties": {
                "id": "vha_561GI",
                "name": "Tinton Falls VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Primary Care CBOC",
                "website": "https://www.va.gov/new-jersey-health-care/locations/tinton-falls-va-clinic/",
                "time_zone": "America/New_York",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "07701-4961",
                        "city": "Tinton Falls",
                        "state": "NJ",
                        "address_1": "55 North Gilbert Street",
                        "address_2": "The Atrium",
                        "address_3": "Building 4, 1st Floor, Suite 4101"
                    }
                },
                },
                "properties": {
                "id": "vha_648GI",
                "name": "Portland VA Clinic",
                "facility_type": "va_health_facility",
                "classification": "Primary Care CBOC",
                "website": "https://www.va.gov/portland-health-care/locations/portland-va-clinic/",
                "time_zone": "America/Los_Angeles",
                "address": {
                    "mailing": {},
                    "physical": {
                        "zip": "97204-3432",
                        "city": "Portland",
                        "state": "OR",
                        "address_1": "308 Southwest 1st Avenue",
                        "address_2": "Community Resource & Referral Center (CRRC)",
                        "address_3": "Lawrence Building, Suite 155"
                    }
                },
                }

@Becapa
Copy link
Contributor

Becapa commented Mar 1, 2024

It was agreed upon in UX sync to hide the 3rd line in all places for now. This will essentially keep everything looking and working the same way it was before upgrading the module to version 2.0. This will also allow teams to take a look at their individual content types/fields and update them on a case-by-case basis. Because of this, I don't think the additional Front End ticket is needed any longer and I will update this ticket's description to reflect these changes.

@jilladams
Copy link
Contributor

Merged to integration branch /integration-address-module-upgrade. Would be helpful to understand who owns the step to get PW / CMS buyin and getting the integration branch merged. If integration branch merge has its own ticket already, this can be closed. @xiongjaneg to assignment for awareness.

@Becapa
Copy link
Contributor

Becapa commented Mar 11, 2024

Here is the PR for the merge of the integration branch into main: #17393

@xiongjaneg
Copy link
Contributor Author

@FranECross @gracekretschmer-metrostar Which engineers on your teams, would you like to review this ticket? The major change is to add an address line 3. Our recommendation and plan is to hide line 3 from Drupal editors to keep their experience the same as now. This could be changed later with further exploration of use cases. The ticket notes some use cases we're aware of for line 3.

@FranECross
Copy link

Closing the loop.... Daniel S on the PW team and Edmund on the CMS team reviewed > Slack thread 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Drupal engineering CMS team practice area Facilities Facilities products (VAMC, Vet Center, etc) Regional office CMS managed VBA product owned by the Facilities team sitewide VAMC CMS managed product owned by Facilities team Vet Center CMS managed product owned by Facilities team
Projects
None yet
Development

No branches or pull requests

7 participants