[Koha] autobarcode MAX value problem
Chris Nighswonger
cnighswonger at foundations.edu
Sat Mar 6 06:47:53 NZDT 2010
Hi Chris,
2010/3/5 Chris Morrison <cmm1005 at gmail.com>:
> So there was a discussion going on that relates to my problem in May of '09,
> in which Joe Atzberger of LibLime said that Koha increments barcodes by
> checking the current MAX and adding one.
>
> Short question: how do I manually change the MAX value? We have around 100K
> records, and for some reason, Koha is auto-incrementing in the 800Ks. Oddly
> enough, I can't find any items in our catalog in the 800K's, either. Anyway,
> it's rather annoying to manually change every number, especially when you
> have multiple catalogers . . .
The incremental barcode algorithm simply does 'SELECT
max(abs(barcode)) FROM items LIMIT 1' which grabs the largest value in
the items.barcode field and then adds one to that. So it would seem
that you have an items.barcode value of 800K somewhere in your db. You
can verify this by connecting to your koha database with the mysql
client and running the SQL given above.
Auto barcode generation in Koha does need some help. Perhaps you can
open an enhancement request for the things you'd like to see it do:
http://bugs.koha.org
Kind Regards,
Chris
More information about the Koha
mailing list