Download & Extend

Rules actions for subscriber and subscription delete

Project:Simplenews
Version:7.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

The attached patch provides two new actions to simplenews_rules

  1. simplenews_rules_action_subscription_delete ( Delete a subscriber from a selected newsletter )
  2. simplenews_rules_action_subscriber_delete ( Delete a subscriber from all newsletters )

Thanks,

DT

AttachmentSizeStatusTest resultOperations
simplenews-rules-delete-subscription-action.patch2.32 KBIdlePASSED: [[SimpleTest]]: [MySQL] 1,628 pass(es).View details

Comments

#1

Status:needs review» needs work

Looks ok to me, one small coding style issue below. Wondering if we want to reference the unsubscribe action somehow in the description, stating that you should only use delete if you really want that information to be gone completely, or something like that.

+++ b/simplenews_rules/simplenews_rules.rules.incundefined
@@ -109,6 +109,34 @@ function simplenews_rules_rules_action_info() {
+      'label' => t('Delete an e-mail address from a newsletter'),
+      'group' => t('Simplenews'),      'named parameter' => TRUE,

The named parameter part should be on a separate line.

Same for the one below.

#2

Thanks Berdir,

I noticed the named parameter on the same line for the other existing actions, so just kept that format, in case was for a reason.

I'll make some adjustments and post an update.

#3

Wasn't aware that the existing rules were wrong as well. You're welcome to fix that as well while you're at it.

#4

Version:7.x-1.0-beta2» 7.x-1.x-dev
Status:needs work» needs review

Thanks Berdir, there's the updated patch.

AttachmentSizeStatusTest resultOperations
1612508-simplenews-rules-delete-subscription-action.patch3.42 KBIdlePASSED: [[SimpleTest]]: [MySQL] 1,796 pass(es).View details

#5

Status:needs review» fixed

Thanks, commited and pushed!

#6

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.