Problem/Motivation

It would be nice to have an ability to skip a row or process if a substr is found in an value.

The functionality should be nearly identical to https://git.drupalcode.org/project/migrate_plus/blob/HEAD/src/Plugin/mig...

* Example usage with full configuration:
* @code
* type:
* plugin: skip_on_substr
* not_equals: true
* source: content_type
* method: row
* case_sensitive: true <----this is the new setting
* value:
* - ABC
* - Abj
* @endcode
* The above example will skip processing any row for which the source row's
* content type field does not contain "ABC" or "Abj".
* 10562WABS would be skipped.
* 555424DABC would be migrated
* 555424Dabc would be skipped
* 344555jAbj would be migrated

The $this->configuration['case_sensitive'] would result in the difference between strpos and stripos. Caution: with php 7.3^ these functions no longer accept integers, so be sure to cast any value passed in to a string. However do not return the cast version so we are not altering the data down the rest of the pipeline.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

swirt created an issue. See original summary.

  • swirt committed 07c8f07 on 8.x-2.x authored by kaise.lafrai
    Issue #3202914 by kaise.lafrai, swirt: Add migrate process plugin to...

swirt’s picture

Status: Active » Fixed

This was just merged and will go out with the next release. Thank you Kaise for your contribution.

swirt’s picture

Status: Fixed » Closed (fixed)