Needs review
Project:
Rules
Version:
8.x-3.x-dev
Component:
Rules Core
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
11 Feb 2021 at 18:14 UTC
Updated:
6 May 2025 at 17:12 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
tr commentedComment #3
tr commentedYour patch had six coding standards problems - see the test output.
Why can't you use DataListItemAdd for this?
Comment #4
somersoft commentedFor the two new files I have update the code to following coding styles.
I tried to use DataListItemAdd and DataListItemRemove but could not work out what to put in the list box to produce an array from a field for example a list of target_id if the field references multiple other same entities. It may be that those two functions need to change but I do not want to break rules that currently use them.
Please advise if there is away to use DataListItemAdd and DataListItemRemove.
Comment #5
tr commentedSet to needs review to trigger testing
Comment #6
TrambThe patch #3 does not work for me (a user list item field).
I propose a patch for the list item remove functionnality, that can take an array or a FieldItemList now.
But it only works on PHP 8.x due to union types.
It works on my 9.4 Drupal.
Comment #7
somersoft commentedRerolled for PHP 8.1
Comment #8
somersoft commentedThe Add functionality was not working and it has been updated in the fork.
Comment #9
somersoft commentedRemoved patch as it is now out of date.