From 979d0c29018120d86ff03e12f7c66c07230420cb Mon Sep 17 00:00:00 2001 From: Mike Rylander Date: Mon, 8 Jan 2018 16:43:26 -0500 Subject: [PATCH] LP#1736419: Bib visibility tests get OR'd Either the source or the existance of a Located URI will trigger record visibility, so we will OR them together. NOTE: This branch is dependant on the branch supplied on LP#1730758. Without that fix, the bib-level visibility attributes are not updated properly when Located URIs are added or changed. Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier --- .../lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index e84efa2e78..9a02d3369f 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -1054,7 +1054,7 @@ sub toSQL { # WITH-clause just generates vis test $$flat_plan{with} .= "\n," if $$flat_plan{with}; - $$flat_plan{with} .= "b_attr AS (SELECT (ARRAY_TO_STRING(ARRAY[$vis_test],'&'))::query_int AS vis_test FROM asset.patron_default_visibility_mask() x)"; + $$flat_plan{with} .= "b_attr AS (SELECT (ARRAY_TO_STRING(ARRAY[$vis_test],'|'))::query_int AS vis_test FROM asset.patron_default_visibility_mask() x)"; # These are magic numbers... see: search.calculate_visibility_attribute() UDF $final_b_attr_test = '(b_attr.vis_test IS NULL OR bre.vis_attr_vector @@ b_attr.vis_test)'; -- 2.43.2