https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44309 Bug ID: 44309 Summary: hbyymmincr autoBarcode counts unrelated numeric barcodes and repeats 0001 Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: jacob.omara@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Target Milestone: --- When autoBarcode is set to "<branchcode>yymm0001" (hbyymmincr), the barcode value builder finds the next number with this pattern: ^[-a-zA-Z0-9]{1,}<yy><mm> The pattern has no end anchor, and the prefix accepts digits. Any barcode that contains <yy><mm> after the first character matches, and the last 4 characters of that barcode are used as the sequence number. For example, in November 2026 the numeric barcode 123456726119999 matches (1234567 + 2611 + 9999). The maximum becomes 9999, the sequence resets, and the value builder returns <branchcode>26110001 again. If that barcode already exists, the item cannot be saved because the barcode is not unique. Libraries with numeric barcodes from earlier systems are affected, because those barcodes often contain the current yymm. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.