Skip to content

Stop messing with the barcodes

Mathieu Bridon requested to merge barcodes into master

Reports on the field indicate that barcodes can contain many characters which we were removing at insertion.

Worse, we weren't handling barcodes the same way when inserting specimens, book specimens, inventory specimens, or when registering loans. So you could add a book specimen with the barcode "BPM'200", check it was fine, then go and edit the specimen in the stock, save without changing anything, and the apostrophe would get removed.

To top it all, searching for specimens by barcode would not do this "cleaning", and users would never find the specimens they had actually entered.

Since different libraries will use different barcode schemes, we shouldn't assume anything about what characters are valid in the barcodes.

The only thing which matters is that when they scan a tag, what gets inputted by the scanner at insertion time is what allows them to search later on.

Fixes #840 (closed)

Merge request reports