From a68ad66498c1a304791b08300b516f6c32c6f27f Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Wed, 2 Dec 2015 14:44:26 +0100 Subject: [PATCH] [SIGNED-OFF] Bug 10163 - batch-mod items tool fails on files over 1000 lines long Content-Type: text/plain; charset="utf-8" When using batch modification tool, if number of items is too big (default 1000), the edit form is not displayed. In perl script, when number of items is too big, template var "item_loop" is not defined and var "too_many_items"is set. This patch allows the display of edit form and text "The following barcodes were found: " even when number of items is too big. Test plan : - Create a file with 11 existing barcodes and 1 not existing in catalogue - Set syspref MaxItemsForBatch to 1000 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode, a table with found items and the edit form - Set syspref MaxItemsForBatch to 10 - Go to Tools > Batch item modification - Select "Barcode file" and upload file - Click on continue => you see a warning with the not found barcode and a text "Too many items ..." => Without patch you don't see the edit form => With patch you see the edit form and can perform the batc modifications Signed-off-by: Owen Leonard Test plan followed successfully. Item modifications completed correctly. --- koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt index 38a76ce..cbd050f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt @@ -79,10 +79,8 @@ $(document).ready(function(){ [% END %] - [% IF ( item_loop ) %] - [% UNLESS ( too_many_items ) %] -

The following barcodes were found:

- [% END %] + [% IF ( item_loop || too_many_items ) %] +

The following barcodes were found:

[% END %] [% END %] @@ -160,7 +158,7 @@ $(document).ready(function(){ [% END %] [% END %] -[% IF ( item_loop ) %] +[% IF ( item_loop || too_many_items ) %]

Edit Items

Checking the box right next the subfield label will disable the entry and delete the subfield on all selected items. Leave fields blank to make no change.
-- 2.1.4