Bug 18280

Summary: Prevent duplicate barcodes being created with autBarcode
Product: Koha Reporter: David Roberts <david.roberts>
Component: CatalogingAssignee: Tomás Cohen Arazi (tcohen) <tomascohen>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: m.de.rooy, tomascohen, veron
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15249
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description David Roberts 2017-03-15 22:48:58 UTC
When several cataloguers are cataloguing simultaneously and the autoBarcode system preference is set to generate the barcodes in 1, 2, 3 form, it is possible that the same item barcode will be assigned to two different items at the same time which prevents the record from being saved. Koha should lock the barcode in some way once it has been allocated, even if the item record is not yet saved.
Comment 1 Tomás Cohen Arazi (tcohen) 2022-12-14 11:45:45 UTC
What if... Koha locked the barcode on cataloguing instead, and the barcode got calculated on saving?
Comment 2 Katrin Fischer 2023-04-16 14:21:05 UTC
(In reply to Tomás Cohen Arazi from comment #1)
> What if... Koha locked the barcode on cataloguing instead, and the barcode
> got calculated on saving?

I think this would work and avoid some of the known issues. We also do it for cardnumbers, so why not for barcodes :)