Build form plugin for process plugin "extract"

Created on 15 May 2024, 7 months ago

Problem/Motivation

The process plugin "extract" is used to pull data from an input array, which may have multiple levels. It is for example useful to get to a value from a Drupal 7 field.

There are two configuration keys specific to the extract plugin:

  • index: the array of keys to access the value.
  • default: an optional default value to assign to the destination if the key does not exist.

Proposed resolution

Add a config form with the following fields:

  • index: a textarea where the keys can be set, one key per line.
  • default: a textfield where a default value can be set.
  • set_default_value: since a default value is optional, we need a checkbox to determine whether or not a default should be set.
  • default_value_as_string: to support null, true or false data types, this checkbox would toggle how to interpret the textfield 'default'. If checked, the value will be written as string. If not checked, it would be cast to a specific value.

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Needs review

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