sorting of shelving locations in search filter
Bug #813151 reported by
Shae
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Low
|
Thomas Berezansky | ||
2.0 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
It appears in 2.0 and 2.1, the shelving locations are not sorted alphabetically by default when you go to Advanced Search - Search Filters - Shelving Location.
Changed in evergreen: | |
milestone: | none → 2.1.0 |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'm have a hunch this is related to https:/ /bugs.launchpad .net/evergreen/ +bug/802700 which discusses the sort order of a few other interfaces but I'm not able to back that up 100%. I'm willing to bet this is ordering shelving locations in the order of "id" (asset. copy_location. id) rather than "name" (asset. copy_location. name). The suspicion on that comes from the fact that "Stacks" always appears first in the list.
A bit deeper digging, reveals that the "advLoadCopyLoc ations" function in adv_global.js is using "FETCH_ COPY_LOCATIONS" which is a call to open-ils. circ.copy_ location. retrieve. all.
Finally, we can trace that API call back to src/perlmods/ lib/OpenILS/ Application/ Circ/CopyLocati ons.pm which doesn't appear to include any sort of ordering. One would think it likely retrieves the copy locations in order of the database id value because there is no explicit sort method.
The solution may be a bit beyond my skill set at this point but hopefully this leads one of the more experienced developers to the solution a bit quicker.