[open-ils-commits] [GIT] Evergreen ILS branch master updated. b1e6cde521f6b83a5b91722893495ecc3772065b

Evergreen Git git at git.evergreen-ils.org
Wed Mar 6 14:26:45 EST 2013


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, master has been updated
       via  b1e6cde521f6b83a5b91722893495ecc3772065b (commit)
      from  b5f791d08b4f3b17e1f93e64d6b3555dec27ea16 (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 b1e6cde521f6b83a5b91722893495ecc3772065b
Author: Mark Cooper <markchristophercooper at gmail.com>
Date:   Wed Oct 10 23:20:02 2012 -0700

    LP#1022582: MARC Exporter includes deleted copies in holdings export
    
    Added check to filter out callnumbers/copies if deleted.
    
    Signed-off-by: Mark Cooper <markchristophercooper at gmail.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
index 2fc4462..373effd 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm
@@ -218,10 +218,11 @@ sub handler {
 
 			if ($holdings) {
 				$req->delete_field( $_ ) for ($req->field('852')); # remove any legacy 852s
-        			my $cn_list = $bib->call_numbers;
+
+        			my $cn_list = [ grep { $_->deleted eq 'f' } @{ $bib->call_numbers } ];
         			if ($cn_list && @$cn_list) {
 
-            				my $cp_list = [ map { @{ $_->copies } } @$cn_list ];
+            				my $cp_list = [ grep { $_->deleted eq 'f' } map { @{ $_->copies } } @$cn_list ];
             				if ($cp_list && @$cp_list) {
 
 	            				my %cn_map;
diff --git a/Open-ILS/src/support-scripts/marc_export.in b/Open-ILS/src/support-scripts/marc_export.in
index 588f8dd..709c613 100755
--- a/Open-ILS/src/support-scripts/marc_export.in
+++ b/Open-ILS/src/support-scripts/marc_export.in
@@ -383,12 +383,12 @@ sub add_bib_holdings {
     my $bib = shift;
     my $r = shift;
 
-    my $cn_list = $bib->call_numbers;
+    my $cn_list = [ grep { $_->deleted eq 'f' } @{ $bib->call_numbers } ];
     if ($cn_list && @$cn_list) {
 
         $count{cn} += @$cn_list;
-    
-        my $cp_list = [ map { @{ $_->copies } } @$cn_list ];
+
+        my $cp_list = [ grep { $_->deleted eq 'f' } map { @{ $_->copies } } @$cn_list ];
         if ($cp_list && @$cp_list) {
 
             my %cn_map;

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

Summary of changes:
 Open-ILS/src/perlmods/lib/OpenILS/WWW/Exporter.pm |    5 +++--
 Open-ILS/src/support-scripts/marc_export.in       |    6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list