Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291641

Have Views' taxonomy term filters use UUIDs instead of entity IDs

$
0
0

Problem/Motivation

To support the model of deployable configuration, Views configuration with filters on taxonomy terms (or any entity reference field for that matter) should use the UUID of the entity chosen.

For example, creating a view which has a filter on a term from a node field should export to configuration with UUID filter values rather than taxonomy term entity IDs.

Current proposal

On the front-end, keep everything using entity IDs. On the back-end (storage), store IDs as UUIDs, and convert them when passing between the front-end.

Tasks

  1. Support viewing, editing and saving the filter form with text/autocomplete.
  2. Support viewing, editing and saving the filter form with select options.
  3. Ensure that views are displaying the correct results.
  4. Update existing schema: Ensure that views can be saved and re-read properly, with the same config.
  5. Migrate existing data: Add update hook to convert entity IDs in config to UUIDs.
  6. Fix test failures.

Original proposal

Add a checkbox to the filter configuration form to allow users to use the uuid of the term as the filter value rather than the tid.

As a stop-gap until this is implemented in core, I implemented it as a custom filter which extends the current taxonomy term id filter. This may help in determining which parts of the code need to be touched when implementing https://gist.github.com/acbramley/1127c4698a9ae86885e03716f47e3281


Viewing all articles
Browse latest Browse all 291641

Trending Articles