[Bug 12626] New: SQLHelper replacement - C4::Acquisition
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Bug ID: 12626 Summary: SQLHelper replacement - C4::Acquisition Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: yohann.dufour@biblibre.com QA Contact: testopia@bugs.koha-community.org The module C4::Acquisition depends on module C4::SQLHelper. However, the module SQLHelper is obsolete, so the calls for InsertInTable have to be replaced by the use of the module DBIx::Class. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|gmcharlt@gmail.com |yohann.dufour@biblibre.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 --- Comment #1 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29953 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29953&action=edit Bug 12626: SQLHelper replacement - C4::Acquisition With this patch, the subroutine NewOrder uses DBIx::Class instead of C4::SQLHelper. Test plan: 1) Apply the patch 2) Execute the unit tests by launching : prove t/db_dependent/Acquisition.t 3) The result has to be a success without error or warning : t/db_dependent/Acquisition.t .. ok All tests successful. Files=1, Tests=79, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.80 cusr 0.09 csys = 1.94 CPU) Result: PASS -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11385 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 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=12626 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29953|0 |1 is obsolete| | --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 30093 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30093&action=edit [SIGNED-OFF] Bug 12626: SQLHelper replacement - C4::Acquisition With this patch, the subroutine NewOrder uses DBIx::Class instead of C4::SQLHelper. Test plan: 1) Apply the patch 2) Execute the unit tests by launching : prove t/db_dependent/Acquisition.t 3) The result has to be a success without error or warning : t/db_dependent/Acquisition.t .. ok All tests successful. Files=1, Tests=79, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.80 cusr 0.09 csys = 1.94 CPU) Result: PASS 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=12626 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- I got: DBIx::Class::Row::new(): No such column 'origquantityrec' on Koha::Schema::Result::Aqorder at /home/koha/src/C4/Acquisition.pm line 1278 On creating an order via the acquisition module. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 --- Comment #4 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 30188 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30188&action=edit Bug 12626: SQLHelper replacement - C4::Acquisition With this patch, the subroutine NewOrder uses DBIx::Class instead of C4::SQLHelper. Test plan: 1) Apply the patch 2) Execute the unit tests by launching : prove t/db_dependent/Acquisition.t 3) The result has to be a success without error or warning : t/db_dependent/Acquisition.t .. ok All tests successful. Files=1, Tests=79, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.80 cusr 0.09 csys = 1.94 CPU) Result: PASS 4) Log in the koha intranet and create a new order in the acquition module 5) The creation has to be a success 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=12626 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30093|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30188|0 |1 is obsolete| | --- Comment #5 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 30602 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30602&action=edit [SIGNED-OFF] Bug 12626: SQLHelper replacement - C4::Acquisition With this patch, the subroutine NewOrder uses DBIx::Class instead of C4::SQLHelper. Test plan: 1) Apply the patch 2) Execute the unit tests by launching : prove t/db_dependent/Acquisition.t 3) The result has to be a success without error or warning : t/db_dependent/Acquisition.t .. ok All tests successful. Files=1, Tests=79, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.80 cusr 0.09 csys = 1.94 CPU) Result: PASS 4) Log in the koha intranet and create a new order in the acquition module 5) The creation has to be a success Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass, new order created without problem, no koha-qa errors -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #30602|0 |1 is obsolete| | --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 30893 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=30893&action=edit [PASSED QA] Bug 12626: SQLHelper replacement - C4::Acquisition With this patch, the subroutine NewOrder uses DBIx::Class instead of C4::SQLHelper. Test plan: 1) Apply the patch 2) Execute the unit tests by launching : prove t/db_dependent/Acquisition.t 3) The result has to be a success without error or warning : t/db_dependent/Acquisition.t .. ok All tests successful. Files=1, Tests=79, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.80 cusr 0.09 csys = 1.94 CPU) Result: PASS 4) Log in the koha intranet and create a new order in the acquition module 5) The creation has to be a success Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Test pass, new order created without problem, no koha-qa errors Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> Tested creating a new order from a subscription, no problems found. Passes tests and QA script. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com Version|unspecified |master --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Yohann! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org --- Comment #8 from Dobrica Pavlinusic <dpavlin@rot13.org> --- This bug introduced regression for acquisition in acqui/neworderempty.pl. In logs, I see error messages like: addorder.pl: DBD::mysql::st execute failed: Cannot add or update a child row: a foreign key constraint fails (`koha`.`aqorders_items`, CONSTRAINT `aqorders_items_ibfk_1` FOREIGN KEY (`ordernumber`) REFERENCES `aqorders` (`ordernumber`) ON DELETE CASCADE ON UPDATE CASCADE) at /srv/koha_ffzg//C4/Acquisition.pm line 1317., referer: https://koha.ffzg.hr:8443/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=54&basketno=3764&biblionumber=237202 And indeed, adding additional debug warns all over the place, it seems that code inside C4/Acquisition.pm sub NewOrder does: my $ordernumber = $rs->create($new_order)->id; which doesn't return ordernumber but instead empty string "" and all hell breaks loose (resulting in missing entries in aqorders_items. My DBIC foo isn't that good, but cookbook suggest that above code is correct: http://search.cpan.org/~danieltwc/DBIx-Class-0.07002/lib/DBIx/Class/Manual/C... I'm puzzled and confused how to fix this. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- It's quite weird, the unit tests pass! I got the same error when I create a new order with items. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12891 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Dobrica Pavlinusic from comment #8) This bug 12891 for a fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|11385 |12891 Depends on|12891 |11385 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12626 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11385 Depends on|11385 | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org