- 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) {
|
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 (
|
return (
|
||||||
<span>
|
<span>
|
||||||
{MailPoet.I18n.t('notSentYet')}
|
{MailPoet.I18n.t('notSentYet')}
|
||||||
|
@@ -98,9 +98,9 @@ class Newsletter extends Model {
|
|||||||
}
|
}
|
||||||
return SendingQueue::tableAlias('queues')
|
return SendingQueue::tableAlias('queues')
|
||||||
->selectExpr(
|
->selectExpr(
|
||||||
'count(DISTINCT(clicks.id)) as clicked, ' .
|
'count(DISTINCT(clicks.subscriber_id)) as clicked, ' .
|
||||||
'count(DISTINCT(opens.id)) as opened, ' .
|
'count(DISTINCT(opens.subscriber_id)) as opened, ' .
|
||||||
'count(DISTINCT(unsubscribes.id)) as unsubscribed '
|
'count(DISTINCT(unsubscribes.subscriber_id)) as unsubscribed '
|
||||||
)
|
)
|
||||||
->leftOuterJoin(
|
->leftOuterJoin(
|
||||||
MP_STATISTICS_CLICKS_TABLE,
|
MP_STATISTICS_CLICKS_TABLE,
|
||||||
|
Reference in New Issue
Block a user