[Bug 12487] New: C4::Contract.pm : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Bug ID: 12487 Summary: C4::Contract.pm : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class 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::Contract.pm depends on module C4::SQLHelper.pm. However, the module C4::SQLHelper.pm is obsolete, so the calls for InsertInTable, UpdateInTable and SearchIntable has 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=12487 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=12487 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=12487 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12493 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 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=12487 --- Comment #1 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29365 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29365&action=edit Bug 12487: SQLHelper replacement - C4::Contract With this patch, the subroutines GetContract, GetContracts, AddContract, ModContract and DelContract uses DBIx::Class instead of C4::SQLHelper Test plan: 1) Apply the patch 2) Execute the unit tests by launching: prove t/db_dependent/Contract.t 3) The command has to be a success : t/db_dependent/Contract.t .. ok All tests successful. Files=1, Tests=43, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.49 cusr 0.05 csys = 1.59 CPU) Result: PASS 4) Log on with a superlibrarian permission 5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor") 6) Record a vendor with a nonzero "name" 7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu) 8) Click on the button "New" > "Contract" and record a new one 9) Verify the displayed data are correct about the contract 10) "Edit" the contract with different values and verify the data are updated 11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation 12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract 13) Verify the contract name displayed is correct 14) Record an active budget and a fund linked to this budget 15) Go on the new basket (Home > Acquisitions > Search the created vendor) 16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct, then cancel 17) Click on "Delete this basket" 18) Click on "Contracts" (in the left menu) in order to go on aqcontract.pl, then "Delete" the created contract 19) The contract is not displayed anymore in the vendor page -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12508 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |12520 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Bug 12487 depends on bug 12520, which changed state. Bug 12520 Summary: Add DBIx::Class::ResultClass::HashRefInflator to list of Koha dependencies http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12520 What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |INVALID -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|12520 | -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |kyle@bywatersolutions.com --- Comment #2 from Kyle M Hall <kyle@bywatersolutions.com> --- Applying: Bug 12487: SQLHelper replacement - C4::Contract fatal: sha1 information is lacking or useless (C4/Contract.pm). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. Patch failed at 0001 Bug 12487: SQLHelper replacement - C4::Contract When you have resolved this problem run "git bz apply --continue". If you would prefer to skip this patch, instead run "git bz apply --skip". To restore the original branch and stop patching run "git bz apply --abort". Patch left in /tmp/Bug-12487-SQLHelper-replacement---C4Contract-XbEHYe.patch kohaqa-koha@koha-dev:~/kohaclone$ patch -p1 < /tmp/Bug-12487-SQLHelper-replacement---C4Contract-XbEHYe.patch patching file C4/Contract.pm Hunk #1 FAILED at 21. Hunk #2 FAILED at 78. Hunk #3 FAILED at 113. 3 out of 3 hunks FAILED -- saving rejects to file C4/Contract.pm.rej patching file t/db_dependent/Contract.t Hunk #1 FAILED at 21. Hunk #2 FAILED at 42. Hunk #3 FAILED at 50. Hunk #4 FAILED at 70. Hunk #5 FAILED at 96. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29365|0 |1 is obsolete| | --- Comment #3 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 29496 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29496&action=edit [SIGNED-OFF] Bug 12487: SQLHelper replacement - C4::Contract With this patch, the subroutines GetContract, GetContracts, AddContract, ModContract and DelContract uses DBIx::Class instead of C4::SQLHelper Test plan: 1) Apply the patch 2) Execute the unit tests by launching: prove t/db_dependent/Contract.t 3) The command has to be a success : t/db_dependent/Contract.t .. ok All tests successful. Files=1, Tests=43, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.49 cusr 0.05 csys = 1.59 CPU) Result: PASS 4) Log on with a superlibrarian permission 5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor") 6) Record a vendor with a nonzero "name" 7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu) 8) Click on the button "New" > "Contract" and record a new one 9) Verify the displayed data are correct about the contract 10) "Edit" the contract with different values and verify the data are updated 11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation 12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract 13) Verify the contract name displayed is correct 14) Record an active budget and a fund linked to this budget 15) Go on the new basket (Home > Acquisitions > Search the created vendor) 16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct, then cancel 17) Click on "Delete this basket" 18) Click on "Contracts" (in the left menu) in order to go on aqcontract.pl, then "Delete" the created contract 19) The contract is not displayed anymore in the vendor page Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described following test plan. Tested on top of Bug 12493 Tests pass 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=12487 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |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=12487 --- Comment #4 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- (In reply to Kyle M Hall from comment #2)
Applying: Bug 12487: SQLHelper replacement - C4::Contract
Hi, on top of 12493 it applies correctly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12487 Kyle M Hall <kyle@bywatersolutions.com> 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=12487 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29496|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29834 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29834&action=edit [PASSED QA] Bug 12487: SQLHelper replacement - C4::Contract With this patch, the subroutines GetContract, GetContracts, AddContract, ModContract and DelContract uses DBIx::Class instead of C4::SQLHelper Test plan: 1) Apply the patch 2) Execute the unit tests by launching: prove t/db_dependent/Contract.t 3) The command has to be a success : t/db_dependent/Contract.t .. ok All tests successful. Files=1, Tests=43, 2 wallclock secs ( 0.04 usr 0.01 sys + 1.49 cusr 0.05 csys = 1.59 CPU) Result: PASS 4) Log on with a superlibrarian permission 5) Go on the page acqui/supplier.pl (Acquisitions > Button "New vendor") 6) Record a vendor with a nonzero "name" 7) Go on the page admin/aqcontract.pl (click on the "Contracts" item in the menu) 8) Click on the button "New" > "Contract" and record a new one 9) Verify the displayed data are correct about the contract 10) "Edit" the contract with different values and verify the data are updated 11) Click on "Delete" in order to delete the contract, verify the displayed data are correct but cancel the operation 12) Click on "New" > "Basket" and verify there is the created contract in field "Contract", then record a basket by selectioning the created contract 13) Verify the contract name displayed is correct 14) Record an active budget and a fund linked to this budget 15) Go on the new basket (Home > Acquisitions > Search the created vendor) 16) Click on "Add to basket" then "From a new (empty) record" and verify the displayed contract name is correct, then cancel 17) Click on "Delete this basket" 18) Click on "Contracts" (in the left menu) in order to go on aqcontract.pl, then "Delete" the created contract 19) The contract is not displayed anymore in the vendor page Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Work as described following test plan. Tested on top of Bug 12493 Tests pass No koha-qa errors 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=12487 --- Comment #6 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29835 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29835&action=edit [PASSED QA] Bug 12487 [QA Followup] - GetContract must return undef with no params 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=12487 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Yohann for all this effort on the unit tests front! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org