stephenharris/Event-Organiser

Group by can result in incorrect ordering

stephenharris opened this issue · 2 comments

This has been reported only a few times - but grouping events by series can result in incorrect ordering. This only happens when the database has the dates stored out of order. Although this probably isn't too regular occurrence, dates appearing out of order in the database shouldn't be a problem.

The bug is that to group occurrences by series, only a "GROUP BY" is used. But this groups and then sorts results, meaning that the first date of an event as it appears in the database is used. As noted above, this is not necessarily the correct date.

A subquery will probably be needed to handle grouping correctly.

Fixed in 2.2.1