Check empty should be a field configuration, not a plugin annotation

Created on 3 August 2023, about 1 year ago
Updated 9 August 2023, about 1 year ago

Problem/Motivation

It doesn't appear that the check empty feature is working as intended.

I believe that since the flag is on a per-field basis, we'll need to move the flag to the CustomFieldTypeInterface and provide a getter for it.

Steps to reproduce

  1. Add two custom fields.
  2. Check the 'empty check' on one of them.
  3. Empty the field, but leave the other filled.
  4. Save the item.
  5. Observe that the row is not removed.

Proposed resolution

Remove the plugin annotation add a member property to the CustomFieldTypeBase, and add an accessor to CustomFieldTypeInterface.

Finally, replace the logic check in CustomItem with the accessor instead of checking the plugin definition.

Remaining tasks

Discuss, patch, review, commit, profit!

User interface changes

None.

API changes

A new interface method on the CustomFieldTypeInterface.

Data model changes

TBD.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States luke.leber Pennsylvania

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

Comments & Activities

Production build 0.71.5 2024