Open jilladams opened 1 year ago
I am not clear how/who assigns the section in the first place. This would help me understand the whole workflow and architecture before adding the filter programmatically.
VA Forms are created by the migration config migrate_plus.migration.va_node_form.yml
in va_gov_migrate
. Both the fields, field_administration and field_va_form_administration, are defined in this migration config, and get their values from this migration.
Solution to edit the taxonomy view should be a simple as adding a relationship for the field_va_form_administration
field, then adding a context for the same. If this taxonomy view was used as a page (page is disabled, it's a block somehow), the context for the field to exclude should be configured to "provide default value" using "Content ID from URL". Under validation, there should be an option for Content and somewhere more stuff to choose from, should be able to select "Exclude". That context using the ID in the URL might still work.
But, this exclusion basically ended up invalidating the entire query. Still trying to figure out how to exclude the field and how the filter could be created at the contrib module level.
If we want to filter out field_va_form_administration from the taxonomy index entity table then what is the point of putting it there in the first place e.g. why are we using it as an entity? Daniel described this in solution 2, which I'm starting to really think about.
Describe the defect
Certain Section listings are showing certain content that they shouldn't.
Content Manager views built based on Section permissions are showing content with a different Section. e.g. VBA section view is showing Forms content with the Octo Section.
User story
As an editor I want to see only content that I can edit, in my editor views so that I don't mess with things I can't / shouldn't touch.
To Reproduce
Steps to reproduce the behavior:
For a specific example form:
Screenshots
Forms appear in VBA section
Section listed on example form
Additional context
Root cause analysis: https://github.com/department-of-veterans-affairs/va.gov-cms/issues/9469#issuecomment-1464402697
Preferred fix: Views filter - Large (5ish points, but: less tech debt)
Ideally, we could filter out certain fields from the section listings by way of configuration in Views. This would require one of several possible solutions, including either adding a field filter (no such filter is provided by the taxonomy_entity_index module), enhancing the existing argument code to do such filtering (probably not recommended as this would also hide the filtering logic)
Side effects with this approach:
We can then upstream these changes to the module, for the community.
Test case On Facilities, Field Office & Field Administration behave in a similar fashion. Editing a Facility's Field Office value to something other than the Section on the same node, will cause that Facility to appear in two different sections.
ACs
CMS Team
Please check the team(s) that will do this work.
CMS Team
Public Websites
Facilities
User support