[Bug 8425] New: Duplicate barcodes generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Priority: P5 - low Change sponsored?: --- Bug ID: 8425 Assignee: koha-bugs@lists.koha-community.org Summary: Duplicate barcodes generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on Severity: normal Classification: Unclassified OS: All Reporter: dcook@prosentient.com.au Hardware: All Status: NEW Version: master Component: Acquisitions Product: Koha Duplicate barcodes are generated when placing an Order in Acquisitions when AcqCreateItem = "placing an order" and Autobarcode is turned on. The problem is that you can accidentally attach 3 items to an order, but only 1 will be saved to the database. When you go to receive your order, you can only receive 1 item as the other two were never made, since the barcode wasn't unique. In 3.8.0, a software error comes up which prevent any item creation, I believe, but master (3.9.x) doesn't throw any warnings or errors. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, this should not happen, but maybe it will help to set the UniqueItemFields to barcode? In my tests it worked really nicely, but perhaps something changed. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #2 from David Cook <dcook@prosentient.com.au> --- (In reply to comment #1)
Hm, this should not happen, but maybe it will help to set the UniqueItemFields to barcode? In my tests it worked really nicely, but perhaps something changed.
No luck. Setting "barcode" in UniqueItemFields makes no change. When did you test it? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I think I signed off on the patch introducing it, so the bug history should tell. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to comment #3)
Hm, I think I signed off on the patch introducing it, so the bug history should tell.
Which patch is that, Katrin? --- Also, when I look at my standard install 3.8.0 or my dev install 3.8.0 branch, the clear button works in the item block. However, it doesn't work in 3.8.2 (maybe 3.8.1) or higher... Also, in my standard 3.8.0 install, duplicate barcodes creates this error: DBD::mysql::st execute failed: Duplicate entry '201180550469528' for key 'itembarcodeidx' at .../lib/C4/Items.pm line 2127. While in my dev install 3.8.0 branch, a nice JS window pops up to say: "Duplicate values detected. Please correct the errors and resubmit." As mentioned before, in 3.8.2+, no error message is generated and only the first item is created. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to comment #4)
(In reply to comment #3)
Also, when I look at my standard install 3.8.0 or my dev install 3.8.0 branch, the clear button works in the item block. However, it doesn't work in 3.8.2 (maybe 3.8.1) or higher...
Hmm. I was a bit hasty there. The clear button clears all the fields except date and barcode... although I'm not sure that's a good thing... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Still not sure why this one is happening... The relevant code in neworderempty.tt looks identical. neworderempty.pl looks like it should be passing everything correctly to the template too. additems.js seems close enough, although check_uniqueness.pl is very different...but a quick test didn't show a difference. Even when I replace all these files with files from a version where the dupe check works, the JS still fails to pick up the duplication of the barcodes. I'll have to try git bisect again, but anyone have any ideas on this one? I figure the problem must be with additems.js and check_uniqueness.pl... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8683 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi David, I filed a separate bug for the problem with the clear link, it's bug 8683 now. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Duplicate barcodes |Autobarcode generates |generated when placing an |duplicate barcodes with |Order in Acquisitions when |AcqCreateItems = on order |AcqCreateItem = "placing an | |order" and Autobarcode is | |turned on | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can replicate the problem: When using Autobarcode items created on order will all get the same(!) barcode. Additionally the check on saving the order fails, so you get no notice and only one item is created. I think this is because Autobarcode checks for the next barcode in the database. We are creating more than one item at once, so there is a problem. I am not sure if that part of the problem can be solved easily, but the form should warn on saving when duplicate barcodes are detected. Settings: UniqueItemFields: barcode AcqCreateItem: placing an order Autobarcode: 1, 2, 3... Turning off Autobarcode (do not generate) didn't solve the problem. There is a javascript error that you can see when saving the order in Firebug. Filing another bug for the broken duplicate check. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Liz Rea (CatalystIT) <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff CC| |liz@catalyst.net.nz -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Liz Rea (CatalystIT) <liz@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |ASSIGNED --- Comment #9 from Liz Rea (CatalystIT) <liz@catalyst.net.nz> --- oops sorry - wrong bug! -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Marijana Glavica <mglavica@ffzg.hr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mglavica@ffzg.hr -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #10 from Galen Charlton <gmcharlt@gmail.com> --- I'm not able to reproduce the problem -- I suspect it was fixed by the patch for bug 8495. David: could you check to see if you're still seeing this? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 --- Comment #11 from David Cook <dcook@prosentient.com.au> --- (In reply to Galen Charlton from comment #10)
I'm not able to reproduce the problem -- I suspect it was fixed by the patch for bug 8495.
David: could you check to see if you're still seeing this?
Really? That's odd. Admittedly, I don't fully comprehend the black magic that is the AJAX item add form in Acquisitions but I'm still seeing this :/. The first item you add will have a new barcode ($nextnum in comparison to the database). However, each new item you add to an order will have the exact same barcode as that one since they're all using the same database data, right? I don't see any checks against the barcode for items already in the order... Steps to Reproduce: 1) Syspref "AcqCreateItem" to "placing an order" 2) Autobarcode to any of the options (although I do get a Javascript error for " generated in the form <branchcode>yymm0001.". So probably try the others for the time being...) 3) UniqueItemFields to "barcode" 4) Go to acquisitions > new basket 5) Click on the "barcode" field for a new item, and add that item 6) Repeat step #5 and observe that they all have the same barcode -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org Status|ASSIGNED |NEW --- Comment #12 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- The problem is that the items are not inserted in the DB when you click on the "Add item" button. So the item form generated just after does not know an item is on the road. Hopefully, there is now a check when you submit the complete order "Duplicate values detected. Please correct the errors and resubmit." The form is not submitted, there are identical barcodes. It seems quite tricky to fix this one. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8425 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=11273 -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org