Browse Source

Bug 25341: Remove whitespace from barcode in add_items.pl

TEST PLAN:
1. Go to course reserves and trying adding a course with a barcode that has some leading/trailing whitespace.
2. It doesnt work
3. Apply patch and restart_all
4. Try again with leading/trailing whitespace, it should work.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
20.05.x
Lucas Gass 3 years ago
committed by Martin Renvoize
parent
commit
a15932117c
Signed by: martin.renvoize GPG Key ID: 422B469130441A0F
  1. 2
      course_reserves/add_items.pl

2
course_reserves/add_items.pl

@ -42,6 +42,8 @@ my $return = $cgi->param('return') || '';
my $itemnumber = $cgi->param('itemnumber') || '';
my $is_edit = $cgi->param('is_edit') || '';
$barcode =~ s/^\s*|\s*$//g; #remove leading/trailing whitespace
my $item = Koha::Items->find( { ( $itemnumber ? ( itemnumber => $itemnumber ) : ( barcode => $barcode ) ) } );
$itemnumber = $item->id if $item;

Loading…
Cancel
Save