addWUQueryFilterApplication is only called with  WUSortField sortField = WUSFapplication ..
Looks like it would break getWorkUnitsSorted() if it were any other value with what it's adding to filter buffer..

If so, it shouldn't bother passing a sortField option, instead just set to the necessary WUSortField type.