Scheduled email handler: Make rescheduling after webform / source entity updates optional

Created on 18 June 2024, 9 days ago
Updated 19 June 2024, 9 days ago

Problem/Motivation

Currently, every time a webform or submission's source entity is updated, all of the scheduled emails tied to it are marked as needing to be rescheduled at the next cron run. See webform_scheduled_email_entity_update(). This can be disruptive and even cause all previously-scheduled-for-send emails to not go out at all if the next cron run happens after the scheduled send date and the ignore_past setting in the handler is TRUE.

It would be nice if this rescheduling behavior was optional so:
1. People might be more aware of this default behavior from the outset (I was not expecting it).
2. Those of us who do not need it and/or find it disruptive could turn it off.

Steps to reproduce

1. Queue up some scheduled emails for send.
2. Make a small update to the webform.
3. See that all scheduled emails are now marked WebformScheduledEmailManagerInterface::SUBMISSION_RESCHEDULE.

Proposed resolution

Make rescheduling after webform / source entity updates optional.

Remaining tasks

Idea acceptance & review.

User interface changes

New option in the webform handlers config (/admin/structure/webform/config/handlers).

API changes

None.

Data model changes

None.

✨ Feature request
Status

Needs review

Version

6.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisolof

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

Comments & Activities

Production build 0.69.0 2024