[Bug 10483] New: check_uniqueness.pl does not work
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Bug ID: 10483 Summary: check_uniqueness.pl does not work Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Acquisitions Assignee: koha-bugs@lists.koha-community.org Reporter: fridolyn.somers@biblibre.com When syspref "UniqueItemFields" is defined, the item uniqueness is tested in acquisition by an Ajax call to check_uniqueness.pl. I noticed that it does not work, item is always created without alert even on existing barcode. I have looked in perl debug mode and found that in check_uniqueness.pl : my $input = new CGI; my @field = $input->param('field'); my @value = $input->param('value'); @field and @value are always empty. It is because in CGI the params are named "field[]" and "value[]". It seems to be because of the ajax serialization of a Javascript Array. -- 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=10483 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|koha-bugs@lists.koha-commun |fridolyn.somers@biblibre.co |ity.org |m --- Comment #1 from Fridolyn SOMERS <fridolyn.somers@biblibre.com> --- Created attachment 19075 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19075&action=edit Proposed patch See commit message -- 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=10483 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=7178 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8684 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think we have a lot of bug reports in that area that might be linked to this bug. A search for "uniqueitemfields" brings up quite a few, I think especially 8694 could maybe be fixed by this (hopefully). At least worth checking when testing this :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19075|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 19184 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19184&action=edit Bug 10483 - check_uniqueness.pl does not work When syspref "UniqueItemFields" is defined, the item uniqueness is tested in acquisition by an Ajax call to check_uniqueness.pl. I noticed that it does not work, item is always created without alert even on existing barcode. I have looked in perl debug mode and found that in check_uniqueness.pl : my $input = new CGI; my @field = $input->param('field'); my @value = $input->param('value'); @field and @value are always empty. It is because in CGI the params are named "field[]" and "value[]". It seems to be because of the ajax serialization of a Javascript Array. This patch corrects this bug. Test plan : - Select an existing item with barcode - Add "barcode" to "UniqueItemFields" syspref (use space as separator for multiple values) - Set "AcqCreateItem" syspref to "Create an item when placing an order" - Go to an acquisition basket - Create a new order from empty - Enter existing barcode in item form and save => You get an alert that barcode already exists and order is not saved - Enter a non-existing barcode in item form and save => Order and item are created Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #19184|0 |1 is obsolete| | --- Comment #4 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 19282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=19282&action=edit Bug 10483 - check_uniqueness.pl does not work When syspref "UniqueItemFields" is defined, the item uniqueness is tested in acquisition by an Ajax call to check_uniqueness.pl. I noticed that it does not work, item is always created without alert even on existing barcode. I have looked in perl debug mode and found that in check_uniqueness.pl : my $input = new CGI; my @field = $input->param('field'); my @value = $input->param('value'); @field and @value are always empty. It is because in CGI the params are named "field[]" and "value[]". It seems to be because of the ajax serialization of a Javascript Array. This patch corrects this bug. Test plan : - Select an existing item with barcode - Add "barcode" to "UniqueItemFields" syspref (use space as separator for multiple values) - Set "AcqCreateItem" syspref to "Create an item when placing an order" - Go to an acquisition basket - Create a new order from empty - Enter existing barcode in item form and save => You get an alert that barcode already exists and order is not saved - Enter a non-existing barcode in item form and save => Order and item are created Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |chris@bigballofwax.co.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |gmcharlt@gmail.com --- Comment #5 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to master. Thanks, Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |tomascohen@gmail.com --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- This patch has been pushed to 3.12.x, will be in 3.12.5. Thanks Fridolyn! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bgkriegel@gmail.com --- Comment #7 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Pushed to 3.10.x, will be in 3.10.11 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10483 Chris Hall <chrish@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chrish@catalyst.net.nz --- Comment #8 from Chris Hall <chrish@catalyst.net.nz> --- Pushed to 3.8.x, will be in 3.8.19 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org