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
99 stars 69 forks source link

Create content model documentation for the Offices content type #19833

Open jilladams opened 1 week ago

jilladams commented 1 week ago

Existing content model doc which is woefully inadequate: https://prod.cms.va.gov/admin/structure/types/manage/office/document

All the places we've found recently that use Office field as a data relationship for the FE: https://github.com/department-of-veterans-affairs/va.gov-cms/issues/14404#issuecomment-2427937255

jilladams commented 1 week ago

@davidmpickett FYI just because. This Offices thing freaks me out, that we almost thought we could deprecate that product in the CMS, but turns out it's the fascia of a zillion things. I may try to take this on myself and may ping you for guidance, if I get some time.

davidmpickett commented 6 days ago

I just did a breeze through Content Build and I think we have a lot of possible connections to Office that are not being used at all and could be safely snipped.

In Drupal everywhere we are using the Entity Reference field_office on Content Types we allow both Office and VAMC System as valid options. This is likely a result of the field being reused and noone bothering to uncheck Office, even though it's not relevant in a lot of cases.

Image

However, most of the corresponding GraphQL calls in Content-Build only care about values of fieldOffice that are VAMC Systems (NodeHealthCareRegionPage) and not those that are Offices (NodeOffice)

For instance on the VAMC Locations List GraphQL query

    fieldOffice {
      targetId
      entity {
        ...on NodeHealthCareRegionPage {

So that means we should be able to safely uncheck Office on the field_office settings for VAMC Location List. This will reduce the false positives on the Drupal side

davidmpickett commented 6 days ago

The Events grapql query is a counter example where the fieldOffice reference does get Offices rather than just VAMC systems

        fieldOffice {
            entity {
              entityType
              entityBundle
              entityId
              ... on Node {
                title
              }
              ... on NodeOffice {
                title