Group jobs by colors and sort