View Issue Details

IDProjectCategoryView StatusLast Update
0006531phplist applicationStatisticspublic06-11-12 14:09
Reportermdurst02 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
Product Version2.10.2 
Target Version2.10.7Fixed in Version2.10.3 
Summary0006531: statsoverview.php and mviews.php display incorrect totals because 'usermessage' table 'entered' field is NULL
DescriptionIf the entered field of the usermessage table is null, queries using counts on the field will result in 0's. I believe the SQL in statsoverview.php on lines 44 - 46 should be changed from count(um.entered) to count(um.status)

$req = Sql_Query(sprintf('select msg.owner,msg.id as messageid,count(um.viewed) as views, count(um.status) as total,subject,date_format(sent,"%%e %%b %%Y") as sent,bouncecount as bounced from %s um,%s msg where um.messageid = msg.id %s %s
    group by msg.id order by msg.entered desc %s', $GLOBALS['tables']['usermessage'],$GLOBALS['tables']['message'],$subselect,$timerange,$limit));

The same is true for mviews.php lines 44 - 46. The field should be changed from um.entered to um.status.

  $req = Sql_Query(sprintf('select msg.id as messageid,count(um.viewed) as views, count(um.status) as total,subject,date_format(sent,"%%e %%b %%Y") as sent,bouncecount as bounced from %s um,%s msg where um.messageid = msg.id %s %s
    group by msg.id order by msg.entered desc %s', $GLOBALS['tables']['usermessage'],$GLOBALS['tables']['message'],$subselect,$timerange,$limit));
TagsNo tags attached.

Relationships

related to 0003721 closed phplist 2.10.x 
related to 0014253 resolvedmichiel clicktracking totals: sent msgs is calculated wrong (especially for RSS msgs) 

Activities

There are no notes attached to this issue.