Make rank_ou org unit sorting function more broadly applicable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Wishlist
|
Unassigned |
Bug Description
This branch attempts to give the org unit ranking function evergreen.rank_ou() broader applicability. The two practical differences between the existing rank_ou and this new implementation in regard to the TPAC are:
1. Pref lib plays a role in sorting even when not searching at CONS. For example, searching SYS1 with a pref_lib of BR1, items at BR1 will sort ahead of items at BR2.
2. It also adds handling for the following special case where the pref lib is a child of the search lib: Searching CONS with a pref lib of SYS1, items at BR1 and BR2 will sort ahead of items at BR3.
Note that when searching a specific branch, search lib still trumps pref lib.
From the commit: ----------
When determining how to sort an org unit (e.g. sorting copies by circ lib for display in the catalog), allow the pref-lib to affect the sort order in global and non-global searches.
Org units are now sorted with the following criteria in the following order. For example, assume we are sorting a copy circ_lib:
1. circ_lib matches the search_lib
2. circ_lib matches pref_lib
3. distance of circ_lib from pref_lib when pref_lib is a child of search_lib, if circ_lib is a child of pref_lib. (For example, searching CONS with pref_lib SYS1, items at BR1 will sort ahead of items at BR3, since BR1 is a child of the pref_lib).
4. proximity of circ_lib to search_lib, when circ_lib is a child of search_lib.
5. In all other cases, circ_lib is sorted to the bottom with the rest of the riffraff.
---------------
working => user/berick/
Changed in evergreen: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Changed in evergreen: | |
milestone: | 2.4.0-alpha1 → 2.4.0-beta |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Seems to work fine for me so far. Continuing testing.