Skip to content
Commit a09b50e0 authored by Daniel Vrátil's avatar Daniel Vrátil 🤖
Browse files

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
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment