This article addresses an issue with the search function returning items in an unexpected order when using two or more sorting parameters.
There are multiple search axes our users can apply to retrieve the exact search results needed. Searches with two or more sorting categories, however, may appear to sort results incorrectly. In the example below, the search results are sorted first by Project and then by Priority. The expected results under Priority are 4, 5, and then 7. Instead, the results are listed as 4, 7, and then 5.
The situation occurs when using the standard Grid View - Outline since it displays cases and subcases in a hierarchical outline.
One thing often overlooked is the way FogBugz populates the results in the default Grid View - Outline, in that search results nest subcases into their parent cases. Also, please note that parent cases can have a different project name than the subcase(s).
Project column to be displayed. The search results then appear similar to the image shown below:
These search results show that there are two cases whose parent case belongs to a different project. If FogBugz finds a parent case during the sorting process, it sorts the parent case before the subcase. If parent and subcase(s) are in different projects, it affects the resultant sorting. This is the reason you might get unexpected sorting at times.
In short, the system always prioritizes the parent case when sorting. Therefore, if the sorting results don't appear correct, be sure to display all the columns involved in your filter settings. This provides you with the necessary information to identify the reason for the unexpected appearance.
If you want to show the searches while ignoring the case hierarchy (parent/subcase relationship), then switch to the Grid View - Flat.