[Koha-devel] [Koha] Barcode Troubles

Mark Alexander marka at pobox.com
Fri Mar 1 17:01:22 CET 2019


Excerpts from abrazier's message of 2019-02-28 15:50:51 -0700:
> While editing items that are being 
> added to our collection, when we click in the field (p - Piece 
> designation (barcode)) which we have always had set to (autoBarcode: 
> generated in the form 1, 2, 3) we are no longer getting the barcode we 
> expect to see.
> 
> We suspect it is now going back to barcodes that once belonged to items 
> that are now deleted (because, that earlier barcode is now available).

I took a look at the Koha source code, and it seems that for some
barcode types, it is using this SQL to determine where to start
generating new barcodes:

  select max(abs(barcode)) from items;

It then increments the value that it obtains this way to use as the
new barcode.

So I suspect that you could fix your problem by creating a dummy item
that has the first barcode you want to use, minus one.

Note that I am not an expert and have not tried this myself.


More information about the Koha-devel mailing list