Expose submission data to rules

Created on 14 June 2013, over 11 years ago
Updated 2 August 2024, 5 months ago

Right now, submission data is not exposed to rules except by way of token replacement or custom php actions.
This patch exposes submission data in a "first-class" way.

In this patch:

  • includes #1948824: Unable to pass submission data into action set component β†’ to fix implementation of hook_rules_data_info(). (This patch will require a re-roll when that gets in.)
  • extends hook_rules_data_info() to expose all properties of a submission
  • provides better access to submission component values
  • class WebformRulesSubmissionWrapper implements RulesIdentifiableDataWrapper to provide entity wrapped access to webform submissions
  • New condition "Submission to a particular webform", which works almost identically to "Webform has name", except it relates the submission data to the webform id, instead of text-to-text. (I chose to implement this new condition as separate, rather than combine them, in order not to break any existing rules.) This relation allows for:
  • Rules assertion to expose webform components only for the selected webform, instead of exposing all webform components for all selectors (which would not be scalable).

Areas for continued development:
* provides read-only data. setter callbacks not implemented.

✨ Feature request
Status

Needs work

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States AaronBauman Philadelphia

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024