Add 'Bounced' status to subscribers [MAILPOET-684]

Fix SubscriberTest->testItHasGroupFilter() making only one of four assertions due to lack of data.
Fix a small issue with Import. Unexpected values for the status field were converted to 'unconfirmed' rather than 'subscribed' due to non-strict comparison in in_array(). This hindered 'bounced' status import as well.
This commit is contained in:
Alexey Stoletniy
2016-11-28 19:37:47 +03:00
parent 299c922cef
commit 36b935b9ae
14 changed files with 89 additions and 8 deletions

View File

@@ -87,6 +87,10 @@ class Segment extends Model {
'SUM(CASE subscribers.status WHEN "' . Subscriber::STATUS_UNCONFIRMED . '" THEN 1 ELSE 0 END)',
Subscriber::STATUS_UNCONFIRMED
)
->select_expr(
'SUM(CASE subscribers.status WHEN "' . Subscriber::STATUS_BOUNCED . '" THEN 1 ELSE 0 END)',
Subscriber::STATUS_BOUNCED
)
->findOne()
->asArray();