It seems that the new fetch sorting by custom attribute feature in 3.2 may offer *some* of this feature, ie make it easier to come up with a hack, but I can't find the relevant files to patch across to 3.1. What files is the relevant functionality defined in does anyone know?