Currently Feeds implements one possible option for all targets — UNIQUE.
Why not to go further and add NOT NULL field option? This would allow to skip source records which doesn't conform some criteria.

Simplest case: skip records where specific field is empty.
More intricate case: skip records which rewritten (e.g. by Feeds Tamper) field values is empty.

Implementation seems to be pretty evident. In FeedsProcessor->map() function before settings values with setTargetElement() or with target's callback, check the $value and if it is empty (all elements of the array is empty) then return NULL instead of $target_item. Correspondingly, in process() — just skip importing.

Thoughts?

Comments

OnkelTem’s picture

Title: Add "NOT NULL" option targets » Add "NOT NULL" option to targets
MegaChriz’s picture

Status: Active » Fixed

I think the "Required field" plugin from Feeds Tamper can handle this? Anyway, if it doesn't, then this feature request would fit better in Feeds Tamper. Setting to "fixed" assuming that the "Required field" plugin does the trick.

MegaChriz’s picture

Category: Feature request » Support request

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.