Problem/Motivation
Apart from the AND/OR condition group, the module ships no condition of its own. Every site either writes its own condition plugins or answers everything through the ECA condition. Two client projects on a Drupal 10 copy of the module built the same generic conditions independently; they belong in the module.
The group submodule can only mail all members of the scope group. Mailing only the trainers, or only the participants whose membership status is "registered", needs a custom delivery.
Proposed resolution
Ship in the base module:
- Status changed (
status_changed, anchored): a list field, a Workflow state field, a boolean field added to the bundle, or the moderation state changed to chosen values, optionally from chosen ones; a creation counts only when ticked. - Field changed (
field_changed, anchored): an added field changed; compares the main value or all values (the end of a date range, the description of a file). - Field value (
field_value): a field of the triggering or the scope entity is one of / none of chosen values, or has / has no value. - Date reached (
date_reached, time-based): start or end of a date or date range field plus an offset; the tracking row is scheduled for that moment. - Acting user is a referenced user (
acting_user_is_referenced_user): the user saving the entity is the one a field path from it reaches (e.g. the member of a membership), as opposed to staff acting for them.
Ship in conditional_notification_group:
- E-mail to group members with chosen roles and membership values (
group_members_filtered_email): members of the scope group narrowed to member roles and to values of a list or boolean field on the membership. An empty filter does not narrow; blocked accounts receive nothing.
FieldValuesTrait holds what the plugins share. The plugin IDs are the ones the client projects already use, so their configured templates keep working once they switch to the module.
Remaining tasks
- Review.
- German translations go to localize.drupal.org once the strings are released.
User interface changes
Five new condition plugins and one new delivery plugin on the template and override forms. README section "The conditions" and the help topic "Conditions and the tracking table" describe them.
API changes
New: Drupal\conditional_notification\Plugin\FieldValuesTrait. No existing API changes.
Data model changes
None. No schema, configuration or update hook.
Issue fork conditional_notification-3631892
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
tkasecker commentedComment #6
daniel.pernold commentedCommitted to 2.0.x and released in 2.0.0-alpha28. Thanks!