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

Update Drupal Address Module to support Philippines addresses #19227

Open
4 tasks
davidmpickett opened this issue Sep 17, 2024 · 6 comments
Open
4 tasks

Update Drupal Address Module to support Philippines addresses #19227

davidmpickett opened this issue Sep 17, 2024 · 6 comments
Assignees
Labels
Drupal engineering CMS team practice area Facilities Facilities products (VAMC, Vet Center, etc) points-5 sitewide VA Manila Special case VAMC that has custom code implementation

Comments

@davidmpickett
Copy link
Contributor

davidmpickett commented Sep 17, 2024

User Story or Problem Statement

Should an editor try to edit a Manila facility, the Address widget throws an error.

Further analysis shows that this is related to the state, being "PH" (for Philippines, which is not a state). The address from the Lighthouse Facilities API is

"address": {
                    "physical": {
                        "zip": "01302",
                        "city": "Pasay City",
                        "state": "PH",
                        "address1": "1501 Roxas Boulevard"
                    }
                },

Should an admin save the node, the facility will save with the State subfield as blank.

Subsequently, an editor can edit and save the facility, but this leaves the state blank.

Steps for Implementation

The information about a given State (or "Administrative area," as they call it) in the address module comes from a dependency, the addressing PHP library. We can subscribe to the AddressEvents::SUBDIVISIONS event described in the module's documention. With that, we can add whatever subdivisions we want (including "PH"). (edited)

Drupal.org
Address
Provides functionality for storing, validating and displaying international postal addresses.

Acceptance Criteria

  • An editor can edit a facility in Manila without error
  • Ad admin user can edit a facility in Manila without the State saving as blank
  • The Manila State can be saved as "PH|Philippines"
  • On a News release, an editor may select a non-US country, City, and State. If this isn't resolved in this ticket, flag for PM/DM to create a new ticket "Philippines" as a US state.
@davidmpickett davidmpickett added Drupal engineering CMS team practice area Facilities Facilities products (VAMC, Vet Center, etc) Needs refining Issue status sitewide VA Manila Special case VAMC that has custom code implementation labels Sep 17, 2024
@omahane
Copy link
Contributor

omahane commented Sep 30, 2024

After some more research, it looks like the information about a given State (or "Administrative area," as they call it) in the address module comes from a dependency, the addressing PHP library. However, there's an event to which we can subscribe, the AddressEvents::SUBDIVISIONS event described in the module's documention. With that, we can add whatever subdivisions we want (including "PH"). (edited)

Drupal.org
Address
Provides functionality for storing, validating and displaying international postal addresses.

@Agile6MSkinner
Copy link

@omahane to look at options and flesh out the ticket. Will also apply to the VBA facility in the Philippines.

@jilladams
Copy link
Contributor

It won't block publishing Manila, but it will block future edits -- Did we decide to consider this launch blocking? Or just: asap when we understand / can get to it?

@jilladams
Copy link
Contributor

We don't know if migrations will break this again.
Not currently launch blocking, not blocking editor from editing.
If we run into this again, Drupal Admins can re-save the node to fix it.

@jilladams
Copy link
Contributor

5 points is assuming an old Drupal hand does the work. If this goes to someone newer, may look more like an 8.

@jilladams
Copy link
Contributor

A new finding related; https://dsva.slack.com/archives/C0FQSS30V/p1732570413688519

on Press Release node, there's also an Address field, and the Philippines is not an option.

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) points-5 sitewide VA Manila Special case VAMC that has custom code implementation
Projects
None yet
Development

No branches or pull requests

4 participants