Keyword Filter should report that multivalued data remains multivalued

Created on 5 January 2025, 16 days ago

Problem/Motivation

KeywordFilter::multiple() now always returns FALSE. The plugin can however handle multiple values. And when it does handle multiple values it returns multiple values in case no SkipTamperItemException is thrown.

Steps to reproduce

  1. Set an array of values for the source data.
  2. Call the tamper() method of the Keyword filter plugin with the array data passed.
  3. The Keyword filter detects that it received an array and that it should iterate over the values.
  4. In case the item should not be skipped, the Keyword filter returns the same data as that it received.
  5. Now call the multiple() method. It returns FALSE even though the data is still multivalued.

Proposed resolution

Just as the Required plugin does, add a class property called 'multiple' to track whether or not the data is multivalued. Set it to FALSE by default. Set it to TRUE when the tamper() method detects that the input data is multivalued. Let the multiple() method return the value of the 'multiple' property, just as the Required plugin does.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇱Netherlands megachriz

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024