Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 6 Aug 2018 18:26:49 +0000 (15:26 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Fri, 10 Aug 2018 07:42:35 +0000 (08:42 +0100)
commit54d960cb86b91bb21cc7c92e1feef9970faaf8a1
treecb451fda8ec3c92525a9ce71a34c10a8c6778041
parent9bb74effa31053c685902df48714a61c18d3c6d9
Bug 21141: Handle non-existent itemnumbers in batch item modification/deletion

The itemnumber list passed from a file in the batch item
modification/deletion tools is not tested.
Like barcodes we should make sure they refer to a valid items in the DB.

Test plan:
- Create a file with barcodes, itemnumbers and random lines
- Use the batch item modification and deletion tools with this file
You should see a table with a list of invalid barcodes and itemnumbers.

Without this patch you got the following error:
Can't call method "title" on an undefined value at
/home/vagrant/kohaclone/tools/batchMod.pl line 580

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit e8e29d3140007b9b92d97ed2f1df7445c6eeb4f9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt
tools/batchMod.pl