https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19814
--- Comment #91 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 203246 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203246&action=edit Bug 19814: (follow-up) Harden batch loop against per-item errors Both batch checkin loops (the initial scan pass and the drain after a librarian confirmation) called process_batch_checkin_item() directly, so a die anywhere underneath (AddReturn, an unexpected exception from a hook) would abort the whole batch and leave every remaining barcode unprocessed. Wrap each call in eval. On failure log through Koha::Logger tagged with the offending barcode and push an { status => 'error' } placeholder into the results so the loop keeps draining. The results table's SWITCH already renders unknown statuses with a "Failed" badge, so the operator sees exactly which barcode exploded while the rest of the batch continues. Test plan: 1. Temporarily add "die 'boom' if \$barcode eq 'BAD';" near the top of process_batch_checkin_item(). 2. Submit a batch of three barcodes A, BAD, C. 3. Confirm A returns successfully, BAD shows as "Failed" in the results table, and C is still processed. 4. Check plack-intranet-error.log for the warn message naming BAD. 5. Revert the debug die and confirm normal batches behave unchanged. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
