Action "List: add item" ignores specified key when setting a numeric key

Created on 25 April 2025, about 12 hours ago

Problem/Motivation

The action "List: add item" allows to create custom lists and provides an option "Set by specified key".
Such a custom list is mostly then a DataTransferObject created on runtime by ECA.

When setting a numeric key, then the DataTransferObject will apply a rekey:
https://git.drupalcode.org/project/eca/-/blob/2.1.x/src/Plugin/DataType/...

That leads to the problem that a specified numeric key will be dropped and replaced by a numeric sequence order of the list. So whenever the (numeric) key is important, for example when setting an options list in a form, then this mechanism to use a custom list for that case becomes unusable.

It may even be worse when not knowing about this fact, that wrong keys are being used within a process.

Steps to reproduce

Proposed resolution

Somehow we need to prevent the rekey logic when setting a specified key.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany mxh Offenburg

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

Comments & Activities

Production build 0.71.5 2024