Bug 13763: Added check for filter syspref in renew.pl

In Circulation->Renew, the renew feature does not check the system
preference itemBarcodeFilter to see whether the barcode needs to be
converted. This patch fixes this, adding a check for the system pref and
applying it accordingly to convert the barcode if it is needed.

Test plan:
1) In Circulation->Renew, enter a barcode that you know exists in the
catalogue but add extra spaces, breaking up the barcode. Note that this
fails with a warning that says 'No item matches this barcode'

2) In system Preferences, set the itemBarcodeInputFilter pref to Remove
spaces and repeat step1. Note that the result is the same as in step 1

3) Apply the patch

4) Repeat step 1, and note that the filter removes the spaces and the
item is renewed (or gives an error that indicates it recognises the
barcode)

Sponsored-by: Catalyst IT
Signed-off-by: Bin Wen <bin.wen@inlibro.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
This commit is contained in:
Hayley Mapley 2019-03-14 04:58:31 +00:00 committed by Nick Clemens
parent bc36d8e06b
commit 48e9082043

View file

@ -44,6 +44,7 @@ my ( $template, $librarian, $cookie, $flags ) = get_template_and_user(
my $schema = Koha::Database->new()->schema();
my $barcode = $cgi->param('barcode');
$barcode = barcodedecode($barcode) if( $barcode && C4::Context->preference('itemBarcodeInputFilter'));
my $override_limit = $cgi->param('override_limit');
my $override_holds = $cgi->param('override_holds');