Dependency Graph View Issue Relation Graph Vertical
related to child of duplicate of

View Issue Details

IDProjectCategoryView StatusLast Update
0006531phpList 3 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.

Activities

There are no notes attached to this issue.