Problem/Motivation

Several issues point out many expected behaviors when importing empty, NULL or 0 values into fields. Fixes are pushing each of those behaviors, but they are mostly conflicting:

  • Do not touch: skip setting the target value. In case of updating items, this preserves the previous value.
  • Import anyway: Overwrite the target value with blank, NULL or 0. For numeric values, this can be useful. However, in most cases, this will cause empty fields to have a label unexpectedly displayed.#1528784: Behavior when importing empty/blank values for numeric field

Default: Do not touch. (This is current behavior.)

Proposed resolution

For now, I propose we implement a switch behavior somewhere in the settings. When #860748: Config for mappers? gets in, we will have this as a mapper config. Each mapper, however, needs it's own implementation with proper logic.

Remaining tasks

Let's list issues for each mapper:

User interface changes

In case we implement a setting, it should alter the config interface for a source.

Comments

a.ross’s picture

Issue summary: View changes

Updated issue summary.

MegaChriz’s picture

Issue summary: View changes
Status: Active » Closed (duplicate)

All was handled in #1107522: Framework for expected behavior when importing empty/blank values + text field fix. To ignore empty values instead of overwriting the target with it, you can try the experimental Feeds empty module.