rules
rules copied to clipboard
Issue #2723259 by yanniboi: Allow data collection input for multiple context fields
This issue is mirrored on drupal.org by https://www.drupal.org/node/2723259.
Added exceptions allowing single value fields to be passed to multiple context fields.
So far I have added an exception that allows submitting a single value field to a multiple context field.
Also when a single value is passed to an action or condition, expecting an array, it gets wrapped in an array.
I've tested my changes by passing '@user.current_user_context:current_user.mail.value' to the SystemSendEmail 'to' field which is multiple cardinality.
Works for me, but needs testing, and I could do with someone confirming that I'm on the right track or letting me know if I am barking up the wrong tree...
OK, so it looks like my exception for lists is breaking IntegrityCheckTest::testListTypeViolation() which makes sense.
I think what I've dont so far is enough of a proof of concept, but I'm going to leave it here for now, as I don't even know yet if I am going about this the right way. Feel free to comment.