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 . . . On a development note, why don't we just have Koha increment from a current position, rather than from the highest? If we delete a large group of records, it would be very useful to be able to assign the old barcodes automatically by starting from the beginning of the "hole." That's what we did with our old system, anyway. So is there a way to do this already, and am I just missing it? Or what variable do I need to change to get Koha to increment from the right place? Thanks, Chris Morrison
Hi Chris, 2010/3/5 Chris Morrison <cmm1005@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
2010/3/6 Chris Morrison <cmm1005@gmail.com>:
On a development note, why don't we just have Koha increment from a current position, rather than from the highest? If we delete a large group of records, it would be very useful to be able to assign the old barcodes automatically by starting from the beginning of the "hole." That's what we did with our old system, anyway.
I think ChrisN probably answered your question already but I couldn't help commenting -- recycling numbers sounds unsafe to me; wouldn't it be better to have gaps in the number space than to risk collisions? (disclaimer - I'm a dev person and not a library person) -reed
participants (3)
-
Chris Morrison -
Chris Nighswonger -
Reed Wade