JBAS-886 hold policies match group exactly
authorBill Erickson <berickxx@gmail.com>
Thu, 24 Sep 2015 15:42:22 +0000 (11:42 -0400)
committerBill Erickson <berickxx@gmail.com>
Thu, 21 Mar 2019 19:46:23 +0000 (15:46 -0400)
Due to conflicting weights on various match points, the hold matrix
matchpoints for student groups has to match the usr_grp exactly and
cannot be set to the parent group of Schools.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
KCLS/sql/schema/deploy/student-groups.sql
KCLS/sql/schema/revert/student-groups.sql

index 05d2de3..c878955 100644 (file)
@@ -39,11 +39,19 @@ PERFORM SETVAL('permission.grp_tree_id_seq', 1000);
 INSERT INTO config.circ_matrix_matchpoint 
     (active, org_unit, grp, circulate) VALUES ( TRUE, 1, 900, FALSE);
 
+-- hold matchpoints have to match the group exactly to overcome
+-- conflicting match weights.
 INSERT INTO config.hold_matrix_matchpoint (
     active, usr_grp, requestor_grp, ref_flag, holdable, 
     distance_is_from_owner, include_frozen_holds, stop_blocked_user, 
     strict_ou_match
-) VALUES (TRUE, 900, 1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
+) VALUES (TRUE, 901, 1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
+
+INSERT INTO config.hold_matrix_matchpoint (
+    active, usr_grp, requestor_grp, ref_flag, holdable, 
+    distance_is_from_owner, include_frozen_holds, stop_blocked_user, 
+    strict_ou_match
+) VALUES (TRUE, 902, 1, FALSE, FALSE, FALSE, FALSE, FALSE, FALSE);
 
 
 -- modify OPAC_LOGIN perm so that's not applied to Users, 
index afc4eaf..df2625c 100644 (file)
@@ -6,7 +6,7 @@ DO $$
 BEGIN
     IF evergreen.insert_on_deploy() THEN
 
-DELETE FROM config.hold_matrix_matchpoint WHERE usr_grp = 900;
+DELETE FROM config.hold_matrix_matchpoint WHERE usr_grp IN (901, 902);
 
 DELETE FROM config.circ_matrix_matchpoint WHERE grp = 900;