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

Modify field values (bulk operations) fail form validation for address fields #4692

Open kevwalsh opened 3 years ago

kevwalsh commented 3 years ago

Describe the defect

Bulk modify field values is not ideal, but it is sometimes required, such as for Facility Operating status.

Editing a field via Bulk edit can result in form validation issues if some required fields are not set on the node.

To Reproduce Steps to reproduce the behavior:

  1. Go to bulk edit page
  2. Filter by Vet Center
  3. Select Modify Field Values
  4. Select all 403 Vet Centers
  5. Select the Apply to selected items
  6. Select the page introduction field >
  7. Add the field value "test" and select Apply.

Repeat this with Events instead of Vet Center

Note console error (see screenshot)

Repeat

Expected behavior Bulk modifying field values should not fail form validation on fields that are not included in the action.

Screenshots

Configure__Modify_field_values__action_applied_to_the_selection___VA_gov_CMS

Possible implementation

ACs

kevwalsh commented 3 years ago

I found another example of this where a required field fails validation during bulk operatoins to modify field values. to reproduce, go to /admin/content/bulk?title=&type=faq_multiple_q_a&moderation_state=All&taxonomy_entity_index_tid_depth=All

and try to change the Section (fka Owner) field for several nodes at once using Modify Field Values

Configure__Modify_field_values__action_applied_to_the_selection___VA_gov_CMS_and_Slack___va-team___CivicActions___15_new_items

Here's the required field. A work around for this one might be to not load an empty paragraph field, since a paragraph is not required (but its fields are, once a paragraph exists).

Create_FAQ_-_multiple_Q_As___VA_gov_CMS

davidmpickett commented 1 year ago

This is an issue with Bulk edit functionality, not specific to Facilities