From 82800db317ffceb1a8b644bf9529e685ac5b42c8 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 3 Dec 2020 17:04:19 +0000 Subject: [PATCH] Bug 27149: Don't strip itemnumber when adding item status via Z3950Responder This breaks MARCEdit integration as svc/bib uses the itemnumber field to update items To test: 1 - sudo koha-z3950-responder --stop kohadev 2 - Run it manually: perl /kohadevbox/koha/misc/z3950_responder.pl -c /etc/koha/sites/kohadev/z3950 -u kohadev-koha -p /var/run/koha/kohadev/z3950-responder.pid -D -d kohadev-koha-z3950 -l /var/log/koha/kohadev/z3950.log 3 - Connect and search to verify itemnumber is in item records yaz-client localhost:2100 base biblios find shuffle show 1+1 4 - sudo koha-z3950-responder --stop kohadev 5 - Run it manually to add item status perl /kohadevbox/koha/misc/z3950_responder.pl --add-item-status k -c /etc/koha/sites/kohadev/z3950 -u kohadev-koha -p /var/run/koha/kohadev/z3950-responder.pid -D -d kohadev-koha-z3950 -l /var/log/koha/kohadev/z3950.log 6 - Connect and search, no itemnumber in records 7 - Apply patch 8 - Stop, restart all the things, and manually start server with item status again 9 - Connect and search, itemnumbers are included Signed-off-by: Fridolin Somers Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart (cherry picked from commit 1d61203fab02038a615be979315e509b8fbdeafd) Signed-off-by: Fridolin Somers --- Koha/Z3950Responder/Session.pm | 2 -- 1 file changed, 2 deletions(-) diff --git a/Koha/Z3950Responder/Session.pm b/Koha/Z3950Responder/Session.pm index 2348b4bb30..006bfaf2ac 100644 --- a/Koha/Z3950Responder/Session.pm +++ b/Koha/Z3950Responder/Session.pm @@ -294,8 +294,6 @@ sub add_item_status { push @statuses, $status_strings->{ON_HOLD}; } - $field->delete_subfield( code => $itemnumber_subfield ); - if ( $server->{add_status_multi_subfield} ) { $field->add_subfields( map { ( $add_subfield, $_ ) } ( @statuses ? @statuses : $status_strings->{AVAILABLE} ) ); } else { -- 2.39.5