From: Thomas Berezansky Date: Tue, 19 Feb 2013 16:42:08 +0000 (-0500) Subject: QueryParser: Check for URIs in staff visibility X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=a885143e22d7774a9a258193f3c95a3a1368ddbb;p=working%2FEvergreen.git QueryParser: Check for URIs in staff visibility Specifically, don't show staff records with no copies but with URIs unless the URIs are "in scope". Signed-off-by: Thomas Berezansky --- 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 ff33c237f8..e11aa0d4a9 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 @@ -903,6 +903,16 @@ sub toSQL { AND pr.peer_record = m.source LIMIT 1 ) + AND + NOT EXISTS( + SELECT 1 FROM asset.call_number acn + JOIN asset.uri_call_number_map aucnm ON acn.id = aucnm.call_number + JOIN asset.uri uri ON aucnm.uri = uri.id + WHERE NOT acn.deleted + AND uri.active + AND acn.record = m.source + LIMIT 1 + ) ) SQL } else {