When doing an aggregation, it does not appear to be possible to sort the data by one of the aggregated columns. For example, if we are doing a SUM of prescriptions written by a doctor and grouped on last name and summed by a prescription count column, it is not clear how to sort by the summed column.

Comments

PapaGrande created an issue. See original summary.

papagrande’s picture

Status: Active » Needs review
StatusFileSize
new700 bytes

The add_orderby() method wasn't handling sorting on aggregation functions. This patch fixes it.

marksskram’s picture

Any ETA on getting this merged into the module?

Thanks!!

  • arh1 committed 0ebc979 on 7.x-1.x authored by PapaGrande
    Issue #2567239 by PapaGrande: Sorting on Aggregated Columns Breaks View
    
arh1’s picture

Status: Needs review » Fixed

This was committed per 0ebc979.

So @marksskram it's in the dev release from today, and will get rolled into the next stable release.

papagrande’s picture

Status: Fixed » Closed (fixed)

Rolled into dev and beta1.