Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Follow-up to #2854017: Provide a handler to schedule the sending of emails
Problem
Webform handlers execute transactions that should be optionally tracked with their results. For example, when a scheduled email is sent, the send date and time should be tracked to prevent duplicate emails. Another use case, would be the response from a remote post should be logged and tracked
Solution
Create a table to optionally log webform handler transactions.
Tasks
- Add 'webform_submission_log' table
- Update WebformSubmissionStorage class
- Add log tab to submissions.
- Only users with 'administer submission' permission can view logs.
- Update TestHandler to log all requests.
- Write tests
Database Changes
webform_submission_log
- lid => 1 (key)
- sid => 1
- uid => NULL|1
- type => scheduled_email
- operation => cron
- value => sent
- timestamp => 1487024261
- indexes: [sid] and [type, operation, value]
Comment | File | Size | Author |
---|---|---|---|
#7 | provide_a_mechanism_to-2854020-7.patch | 69.95 KB | jrockowitz |
|
Comments
Comment #2
jrockowitz CreditAttribution: jrockowitz as a volunteer and commentedComment #7
jrockowitz CreditAttribution: jrockowitz as a volunteer and commentedComment #10
jrockowitz CreditAttribution: jrockowitz as a volunteer and commentedComment #11
kclarkson CreditAttribution: kclarkson commentedLog submission looks great and definitely handy for confirming whether or not someone had an email sent.