]> git.evergreen-ils.org Git - Evergreen.git/commit
rank_ou() honors pref-lib in non-global context
authorBill Erickson <berick@esilibrary.com>
Thu, 7 Feb 2013 18:43:19 +0000 (13:43 -0500)
committerBen Shum <bshum@biblio.org>
Mon, 11 Mar 2013 21:37:20 +0000 (17:37 -0400)
commit94813cbe6a061b95079a7a40375473e9c7914eaf
tree8ef6a63dd84d1bb33be43be0284e81f5abb6f733
parent8b47e5eca74b1cbc78ad20db074136601648b5ca
rank_ou() honors pref-lib in non-global context

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.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Ben Shum <bshum@biblio.org>
Open-ILS/src/sql/Pg/990.schema.unapi.sql
Open-ILS/src/sql/Pg/upgrade/XXXX.schema.relax_rank_ou.sql [new file with mode: 0644]