[Koha-bugs] [Bug 599] edited items are stored incorrectly in old Koha DB

bugzilla-daemon at wilbur.katipo.co.nz bugzilla-daemon at wilbur.katipo.co.nz
Fri Sep 26 15:11:26 CEST 2003


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=599





------- Additional Comments From paul.poulain at free.fr  2003-09-27 01:11 -------
OK, I think i've got it... Let me explain...
The problem is here :
"First, remember that the problem started when staff had added an item to an 
existing biblio record *without* *a* *barcode*, and then edited that item to add
the barcode."
why ?
Because in the DB barcode is set to NOT NULL. And there is a UNIQUE INDEX on
this row.
So, if you try to enter an item without barcode, you get in error log :
DBD::mysql::st execute failed: Column 'barcode' cannot be null at
/home/paul/koha.dev/koha/C4/Biblio.pm line 1701.
meaning the item row has NOT been created.
the problem is that the itemnumber is returned even if no item has been created.

then, you create a new item (with a barcode) that has the same number as the
"false one".
Then you have 2 items with the same items.itemnumber in MARC.
Then your DB is broken...

The solution(s) :
* immediate solution : modify barcode in your MARC parameter table to make it
mandatory : i've tested, it works => you can't validate if there is no barcode
number. If the barcode exists, it's refused too.
* we could change the DB structure to barcode = non mandatory. Is it a good idea
? I'll ask on koha ml.

/me is quite happy to have found the problem...




------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.




More information about the Koha-bugs mailing list