https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42355 Bug ID: 42355 Summary: (Bug 23010 follow-up) in additem.pl improperly handled exception Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P3 Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: lucas@bywatersolutions.com, m.de.rooy@rijksmuseum.nl Depends on: 23010 Bug 21010 introduced catching exeption around $item->store (cataloguing/additem.pl line ~ 647). But if the exception occurs, it is not properly handled. 1. $_->error gives: Can't locate object method "error" via package "DBIx::Class::Exception" -- there is no such method under $_ 2. even if it was, we should push to @errors only error codes defined and handled in additem.tt, such as: onloan_cannot_withdraw, intransit_cannot_withdraw, barcode_not_unique, no_next_barcode etc. (cf. bottom of the additem.pl and additem.tt). To reproduce: In ktd edit any item, changing the barcode to a string longer than 20 chars (e.g. 123456789012345678901234567890). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23010 [Bug 23010] If an item is checked out or in transit it should not be able to be marked withdrawn -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.