From e52172a18fdb42da3efa9f34d6624681a09ffcbc Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Thu, 24 Sep 2015 11:42:22 -0400 Subject: [PATCH] JBAS-886 hold policies match group exactly 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 --- KCLS/sql/schema/deploy/student-groups.sql | 10 +++++++++- KCLS/sql/schema/revert/student-groups.sql | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/KCLS/sql/schema/deploy/student-groups.sql b/KCLS/sql/schema/deploy/student-groups.sql index 05d2de34da..c87895542c 100644 --- a/KCLS/sql/schema/deploy/student-groups.sql +++ b/KCLS/sql/schema/deploy/student-groups.sql @@ -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, diff --git a/KCLS/sql/schema/revert/student-groups.sql b/KCLS/sql/schema/revert/student-groups.sql index afc4eafb42..df2625cae9 100644 --- a/KCLS/sql/schema/revert/student-groups.sql +++ b/KCLS/sql/schema/revert/student-groups.sql @@ -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; -- 2.11.0