[open-ils-commits] [GIT] Evergreen ILS branch rel_3_4 updated. 372965906c0a7000c4646c678467d2e1dfceb56b

Evergreen Git git at git.evergreen-ils.org
Thu Oct 3 18:07:06 EDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, rel_3_4 has been updated
       via  372965906c0a7000c4646c678467d2e1dfceb56b (commit)
      from  3588bbfa67b81d12e50b2d1403655492f4930f45 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 372965906c0a7000c4646c678467d2e1dfceb56b
Author: Jeff Davis <jdavis at sitka.bclibraries.ca>
Date:   Tue Oct 2 14:28:31 2018 -0700

    LP#1609556: only include OPAC-visible copies in SRU/Z39.50 holdings
    
    To test:
    
    1. Create a bib record.
    2. Add an item to the record at BR1. Mark it as not OPAC-visible.
    3. Do a CONS-level SRU search for the record, including holdings. The
       record is not included in results because there are no OPAC-visible
       holdings.
    4. Add a second item to the same record, this time at BR3. Mark this
       one as OPAC-visible.
    5. Repeat the CONS-level SRU search, including holdings. The record
       appears in search results, but holdings information in 852 includes
       *all* copies, including non-OPAC-visible copies.
    
    Signed-off-by: Jeff Davis <jdavis at sitka.bclibraries.ca>
    Signed-off-by: Kyle Huckins <khuckins at catalyte.io>
    Signed-off-by: Galen Charlton <gmc at equinoxinitiative.org>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
index b43d266069..2ba1f381a4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm
@@ -2031,6 +2031,13 @@ sub sru_search {
                         my $cn = $volume->getAttribute('label');
                         my $owning_lib = $volume->getAttribute('lib');
                         for my $copy ($volume->getElementsByTagName('copy')) {
+                            # skip copies that aren't OPAC-visible
+                            next if (
+                                $copy->getAttribute('opac_visible') eq 'false' ||
+                                $copy->getChildrenByTagName('status')->[0]->getAttribute('opac_visible') eq 'false' ||
+                                $copy->getChildrenByTagName('location')->[0]->getAttribute('opac_visible') eq 'false' ||
+                                $copy->getChildrenByTagName('circ_lib')->[0]->getAttribute('opac_visible') eq 'false'
+                            );
                             push @copies, {
                                 a => $copy->getChildrenByTagName('location')->[0]->textContent,
                                 b => $owning_lib,

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm | 7 +++++++
 1 file changed, 7 insertions(+)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list