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

Lovell editors can not select a System when creating VAMC System Health Service #12433

Closed omahane closed 1 year ago

omahane commented 1 year ago

Describe the defect

When creating or editing a VAMC System Health Service, Lovell editors have no options in the VAMC System dropdown. Because of that, they can not create the service.

To Reproduce

Steps to reproduce the behavior:

  1. When I am logged in as a user with the roles "vamc_content_creator, content_publisher"
  2. And my workbench access sections are set to "347" (Lovell Federal health care).
  3. And I go to "/node/52672/edit" or "/node/add/regional_health_care_service_des"
  4. I try to select option "Lovell Federal health care - TRICARE" from VAMC System dropdown
  5. I can't select anything in that dropdown, which is a required field to edit or create the page

AC / Expected behavior

An editor of a given system, including Lovell, should be able to create or edit a VAMC System Health Service, including choosing the appropriate VAMC System from the VAMC System dropdown.

QA Steps

As a Lovell Editor

As a Non-Lovell Editor

Labels

(You can delete this section once it's complete)

Team

Please check the team(s) that will do this work.

omahane commented 1 year ago

From @ryguyk via Slack

The existing (previous) code was hiding options that included "Lovell Federal health care". That worked before because the other options were Lovell Federal VA health care and Lovell Federal TRICARE health care, so those names did not include the federal text.

Now that the new names are Lovell Federal health care - VA and Lovell Federal Health Care - TRICARE, these names include "Lovell Federal health care" and those names will always be hidden. The updated code changes things to be an exact check, which should be exactly what we want.