From e8a19adfbbd80c1beb57d777fa1770bc1694c6e8 Mon Sep 17 00:00:00 2001 From: Martha Driscoll Date: Thu, 25 May 2017 14:39:30 -0400 Subject: [PATCH] LP#1692106: Z39.50 server includes prefix and suffix in 852 Add the call number prefix and suffix to the 852 $k and $m when copy information is returned by the Z39.50 server. Signed-off-by: Martha Driscoll Signed-off-by: Mike Rylander --- Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm index bb1dbd6c02..a5fea7e630 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/SuperCat.pm @@ -2026,6 +2026,8 @@ sub sru_search { my @copies; for my $node ($marcxml->getElementsByTagName('holdings')) { for my $volume ($node->getElementsByTagName('volume')) { + my $prefix = $volume->getChildrenByTagName('call_number_prefix')->[0]->getAttribute('label'); + my $suffix = $volume->getChildrenByTagName('call_number_suffix')->[0]->getAttribute('label'); my $cn = $volume->getAttribute('label'); my $owning_lib = $volume->getAttribute('lib'); for my $copy ($volume->getElementsByTagName('copy')) { @@ -2035,6 +2037,8 @@ sub sru_search { c => $cn, d => $copy->getChildrenByTagName('circ_lib')->[0]->getAttribute('shortname'), g => $copy->getAttribute('barcode'), + k => $prefix, + m => $suffix, n => $copy->getChildrenByTagName('status')->[0]->textContent }; } @@ -2070,6 +2074,8 @@ sub sru_search { c => $copy->{c}, d => $copy->{d}, g => $copy->{g}, + ($copy->{k} ? (k => $copy->{k}) : ()), + ($copy->{m} ? (m => $copy->{m}) : ()), n => $copy->{n} ) ); -- 2.43.2