refactor and fix queue sorting for name fields and pending queue (bug 890177)
Merge pull request #1123 from ngokevin/revqueuesort

refactor and fix queue sorting for name fields and pending queue (bug 890177)