whitespace-padding should be stripped from item barcodes
Description
Leading and trailing whitespace should be stripped from item-record barcodes before they are POSTed. Supplying an item barcode with leading or trailing whitespace causes the circulation/check-in-by-barcode API endpoint to fail with a 500 status code and the response,
Failed to contact storage module: java.io.IOException: Connection reset by peer
shows the same problem on checkout; this is for checkin.
To test this, enter a barcode such as " 123 " (note the leading and trailing spaces). If the problem is fixed, you will get an alert message saying "No item with barcode 123 could be found". If the problem is not fixed, you will get an Okapi JavaScript alert saying, "Failed to contact storage module: java.io.IOException: Connection reset by peer"
Scratch that. Apparently the error message is swallowed on checkin, but it is still testable:
Find an item to check out and check it out to any user.
Visit the checkin page.
Enter a space, then paste in the barcode.
Click the "Enter" button If this is resolved, you'll see the item listed in the checked in items table. If the problem persists, nothing will happen, though if you're the curious type and have the developer tools open, you can see the 500 error in the network inspector.
Ann-Marie Breaux April 20, 2019 at 6:10 AM
This is showing in the manual testing queue, but I'm not sure how to test it. Ideas? Thank you!
Leading and trailing whitespace should be stripped from item-record barcodes before they are POSTed. Supplying an item barcode with leading or trailing whitespace causes the
circulation/check-in-by-barcode
API endpoint to fail with a 500 status code and the response,