[open-ils-commits] r18552 - trunk/Open-ILS/src/sql/Pg (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Mon Nov 1 13:32:19 EDT 2010
Author: miker
Date: 2010-11-01 13:32:15 -0400 (Mon, 01 Nov 2010)
New Revision: 18552
Modified:
trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
Log:
keep 1.6.1-2.0 upgrade script in sync
Modified: trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql
===================================================================
--- trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-11-01 17:31:22 UTC (rev 18551)
+++ trunk/Open-ILS/src/sql/Pg/1.6.1-2.0-upgrade-db.sql 2010-11-01 17:32:15 UTC (rev 18552)
@@ -6556,26 +6556,31 @@
-- caclulate the rule match weight
IF current_mp.item_owning_ou IS NOT NULL THEN
+ CONTINUE WHEN current_mp.item_owning_ou NOT IN (SELECT (actor.org_unit_ancestors(item_cn_object.owning_lib)).id);
SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.item_owning_ou, item_cn_object.owning_lib)::FLOAT + 1.0)::FLOAT;
current_mp_weight := current_mp_weight - tmp_weight;
END IF;
IF current_mp.item_circ_ou IS NOT NULL THEN
+ CONTINUE WHEN current_mp.item_circ_ou NOT IN (SELECT (actor.org_unit_ancestors(item_object.circ_lib)).id);
SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.item_circ_ou, item_object.circ_lib)::FLOAT + 1.0)::FLOAT;
current_mp_weight := current_mp_weight - tmp_weight;
END IF;
IF current_mp.pickup_ou IS NOT NULL THEN
+ CONTINUE WHEN current_mp.pickup_ou NOT IN (SELECT (actor.org_unit_ancestors(pickup_ou)).id);
SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.pickup_ou, pickup_ou)::FLOAT + 1.0)::FLOAT;
current_mp_weight := current_mp_weight - tmp_weight;
END IF;
IF current_mp.request_ou IS NOT NULL THEN
+ CONTINUE WHEN current_mp.request_ou NOT IN (SELECT (actor.org_unit_ancestors(request_ou)).id);
SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.request_ou, request_ou)::FLOAT + 1.0)::FLOAT;
current_mp_weight := current_mp_weight - tmp_weight;
END IF;
IF current_mp.user_home_ou IS NOT NULL THEN
+ CONTINUE WHEN current_mp.user_home_ou NOT IN (SELECT (actor.org_unit_ancestors(user_object.home_ou)).id);
SELECT INTO tmp_weight 1.0 / (actor.org_unit_proximity(current_mp.user_home_ou, user_object.home_ou)::FLOAT + 1.0)::FLOAT;
current_mp_weight := current_mp_weight - tmp_weight;
END IF;
@@ -18867,3 +18872,4 @@
\qecho Upgrade script completed.
+
More information about the open-ils-commits
mailing list