rules icon indicating copy to clipboard operation
rules copied to clipboard

Issue #2723259 by yanniboi: Allow data collection input for multiple context fields

Open yanniboi opened this issue 8 years ago • 3 comments

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.

yanniboi avatar May 12 '16 23:05 yanniboi

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.

yanniboi avatar May 12 '16 23:05 yanniboi

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...

yanniboi avatar May 12 '16 23:05 yanniboi

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.

yanniboi avatar May 13 '16 10:05 yanniboi