Fixed that sorting time entries by custom field raises a SQL error (#14366).
Authored by: jplang 2013-07-28
Parent: [r12041]
Child: [r12043]