- Updates statistics to display only 1 click event from a given subscriber
Fixes #417 (7)
This commit is contained in:
@@ -215,7 +215,7 @@ define(
|
||||
}
|
||||
},
|
||||
renderStatistics: function(item) {
|
||||
if(!item.statistics || !item.queue || item.queue.status === 'scheduled') {
|
||||
if(!item.statistics || !item.queue || item.queue.count_processed == 0 || item.queue.status === 'scheduled') {
|
||||
return (
|
||||
<span>
|
||||
{MailPoet.I18n.t('notSentYet')}
|
||||
|
@@ -98,9 +98,9 @@ class Newsletter extends Model {
|
||||
}
|
||||
return SendingQueue::tableAlias('queues')
|
||||
->selectExpr(
|
||||
'count(DISTINCT(clicks.id)) as clicked, ' .
|
||||
'count(DISTINCT(opens.id)) as opened, ' .
|
||||
'count(DISTINCT(unsubscribes.id)) as unsubscribed '
|
||||
'count(DISTINCT(clicks.subscriber_id)) as clicked, ' .
|
||||
'count(DISTINCT(opens.subscriber_id)) as opened, ' .
|
||||
'count(DISTINCT(unsubscribes.subscriber_id)) as unsubscribed '
|
||||
)
|
||||
->leftOuterJoin(
|
||||
MP_STATISTICS_CLICKS_TABLE,
|
||||
|
Reference in New Issue
Block a user