Make rank_ou org unit sorting function more broadly applicable

Bug #1119435 reported by Bill Erickson
6
This bug affects 1 person
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/expand-rank-ou-func

Tags: pullrequest
Ben Shum (bshum)
Changed in evergreen:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Ben Shum (bshum) wrote :

Seems to work fine for me so far. Continuing testing.

Ben Shum (bshum)
Changed in evergreen:
milestone: 2.4.0-alpha1 → 2.4.0-beta
Revision history for this message
Ben Shum (bshum) wrote :

Picked to master.

Changed in evergreen:
status: Triaged → Fix Committed
Ben Shum (bshum)
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.