Updated sorting feature for tickets table