When creating items on order or on receive there is a duplicate check for barcodes that usually detects if you are trying to reuse an already used barcode and prevents you from saving. But if you have used a barcode too long before and are not running with 'strict', the barcode will have been cut off at 20 characters. Now trying to create the next item with a too long barcode, where the 20 first characters match, will not trigger the duplicate warning, but instead an internal server error. The bad part is that the order will still be created/received, but the items are not. To test: - Edit an item in your catalog to have a barcode with 20 characters - Create a new basket in acq with either "create items on order" or "on receive" - Start the ordering process, when you get to the create items step - Enter your 20 character barcode, try to safe - Verify the duplicate message is triggered on saving - Add some characters to the end of your barcode - Verify on saving there is an internal server error - The order is created, but there are no new items
20 should be the default for subfields linked to items.barcode. Would that work?
Sorry, can you explain?
There is a "Max length" value when editing a subfield. https://snipboard.io/qLAc3b.jpg If you set it to 20 I guess the barcode input will not accept more than 20 characters.
Hi Jonathan, that seems to work - so we should make this change in our frameworks I guess? If there weren't just that many... :)
Created attachment 105352 [details] [review] Bug 25386: Set maxlength=20 for items.barcode
I can provide that patch for the 'en' framework, but doing it for all the languages is too painful (like there are around 50 files to edit).
Maybe we can revisit this one now as most of the framewrks have been moved :)