From 4ebed3e6364a460b84073ecc3d8f3cbe4b75ab76 Mon Sep 17 00:00:00 2001 From: Chloe Date: Thu, 21 Jan 2016 23:47:42 +0000 Subject: [PATCH] Bug 12045 - Transfer impossible if barcode includes spaces MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit have changed the code which strips the white space to only remove the leading and trailing white space instead To Test- 1- go to circulation -> transfer 2- attempt to tranfer an item where the barcode has a space in the middle of it 3- it should fail 4- apply patch 5- try again 6- it should work NOTE: I purposefully added: die "($barcode)"; Before, all spaces were removed. ' white space ' became '(whitespace)' After, only external spaces were remove ' white space ' became '(white space)' Signed-off-by: Mark Tompsett Signed-off-by: Kyle M Hall Signed-off-by: Brendan A Gallagher (cherry picked from commit 47caf69a469cb48ef18754d2e3bf077e5e882aa4) Signed-off-by: Julian Maurice (cherry picked from commit 8fa06fdfde407522d6f647527e1b3fefa52a154d) Signed-off-by: Frédéric Demians --- circ/branchtransfers.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/circ/branchtransfers.pl b/circ/branchtransfers.pl index 4caca05bd6..67c8f67a12 100755 --- a/circ/branchtransfers.pl +++ b/circ/branchtransfers.pl @@ -109,8 +109,8 @@ my @trsfitemloop; my %transfereditems; my $transfered; my $barcode = $query->param('barcode'); -# strip whitespace -defined $barcode and $barcode =~ s/\s*//g; # FIXME: barcodeInputFilter +# remove leading/trailing whitespace +defined $barcode and $barcode =~ s/^\s*|\s*$//g; # FIXME: barcodeInputFilter # warn "barcode : $barcode"; if ($barcode) {