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

Staff profiles created early and only touched by bots show pending #13862

Open swirtSJW opened 1 year ago

swirtSJW commented 1 year ago

Describe the defect

A large number of staff profiles were created before we added the field to control whether there was a staff profile page created. Then many of them were bulk published and have never been saved by a human. The result is, the field does not exist in their revisions. As a result, many incorrectly show that a FE page is "pending" when in fact they have no FE page. There is also a preview button which should not be showing for pages that have no checkbox checked or no content in the fields that appear.

The problem is fixed by a human editing the page and then saving it.

However given the number of pages affected, there is an easy code fix.

Original Slack reporting and investigation

To Reproduce

Steps to reproduce the behavior:

  1. Go to 'https://prod.cms.va.gov/butler-health-care/staff-profiles/breigh-speidel'

  2. Look on the top of the right rail image

  3. Saving the node without making any changes will fix the problem

AC / Expected behavior

Screenshots

Timeline of bots altering the nodes. image

Never existed image

Additional context

The code to prevent the pending was added in https://github.com/department-of-veterans-affairs/va.gov-cms/pull/7940/files Feb 2022.

A simple alteration to the logic to make it look for a positive will fix this image

swirtSJW commented 1 year ago

It needs to be changed here docroot/modules/custom/va_gov_workflow_assignments/src/Plugin/Block/EntityMetaDisplay.php

and docroot/modules/custom/va_gov_backend/va_gov_backend.module