Fix CollectionStatistics reporting wrong numbers for folders with $IGNORED emails
$IGNORED emails are automatically marked us read, so they always have \SEEN flag too. The current query would return two entries of each such PimItem with the third column being "1" in both. That means each ignored email was counted twice, so in theory we could end up with "read" count being higher than the total amount of items in the collection. The new approach joins the PimItemFlagRelation table twice, once for \SEEN and once for $IGNORED flag, and sets the "read" column to 1 if the email is read of ignored, thus avoiding the duplication.
parent
8a1ce311
Please register or sign in to comment