https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27248 --- Comment #59 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 212012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212012&action=edit Bug 27248: (RM follow-up) Treat a barcode list of "0" as a list, not as no list The barcode filter was applied under "if ($list)". Perl treats the string "0" as false, so a barcode list consisting of the single barcode "0" skipped the barcode filter altogether. The list operation then matched whatever the remaining filters selected, and without "Preview results" it extended the due date of every one of those checkouts, up to every checkout in the library system when no other filter was set. Apply the barcode filter whenever a barcode list was submitted, that is when the parameter is defined and not the empty string. An empty textarea still means "no barcode list", so the other filters keep working on their own, and a list holding only whitespace still matches no checkout. To test: 1. Go to Tools > Batch extend due dates 2. Enter 0 as the barcode list and "7" as the number of days. Uncheck "Preview results". Do not set any other filter => Before the patch: the due date of every checkout is extended => After the patch: no checkout is modified, and 0 is reported as a barcode that was not found 3. Leave the barcode list empty, enter a library and run again => The checkouts of that library are listed as before Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.