[Bug 12482] New: C4::Budgets : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 Bug ID: 12482 Summary: C4::Budgets : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement 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::Budgets.pm depends on module C4::SQLHelper.pm. However, the module C4::Helper.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=12482 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=12482 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=12482 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 --- Comment #1 from Yohann Dufour <yohann.dufour@biblibre.com> --- Created attachment 29277 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29277&action=edit Bug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx::Class This patch includes: - removing the use of subroutines InsertInTable, UpdateInTable, SearchInTable replaced by subroutines of DBIx::Class in the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods and admin/aqbudgetperiods.pl - removing old database fields in OrderFromSubscription.t, Bookseller.t, Budgets.t, Serials.t, Serials_2.t - improvement of unit tests in t/db_dependent/Budgets.t - adaptation of calls to the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods in order to match with the use of DBIx::Class Test plan: 1) Execute the UT of all of files wich uses AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod or GetBudgetPeriods by launching the command : prove t/Budgets/ t/Budgets.t t/db_dependent/Budgets.t t/db_dependent/Acquisition.t t/db_dependent/Acquisition/ t/db_dependent/Bookseller.t t/db_dependent/Serials.t t/db_dependent/Serials_2.t 2) The result has to be a success : t/Budgets/CanUserModifyBudget.t ........................... ok t/Budgets/CanUserUseBudget.t .............................. ok t/Budgets.t ............................................... ok t/db_dependent/Budgets.t .................................. ok t/db_dependent/Acquisition.t .............................. ok t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok t/db_dependent/Acquisition/Invoices.t ..................... ok t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2 t/db_dependent/Acquisition/TransferOrder.t ................ ok t/db_dependent/Acquisition/close_reopen_basket.t .......... ok t/db_dependent/Bookseller.t ............................... 16/72 WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/yohann/koha/C4/Bookseller.pm line 135. t/db_dependent/Bookseller.t ............................... ok t/db_dependent/Serials.t .................................. ok t/db_dependent/Serials_2.t ................................ ok All tests successful. Files=14, Tests=571, 22 wallclock secs ( 0.17 usr 0.03 sys + 20.26 cusr 1.10 csys = 21.56 CPU) Result: PASS 3) Go on the page admin/aqbudgetperiods.pl : Koha Administration > Budgets 4) Click on the button "New Budget" and record a new budget with a "nonzero amount" and "make budget active" 5) Click on the button "New Budget" and record another budget without "make budget active" 6) Verify there is the firt budget displayed in "Active budgets" and the second budget in "Inactive budgets" 7) Edit a budget and verify the new values are updated 8) Click on the budget active name in order to go on the page admin/aqbudgets.pl 9) Click on the button "New fund for ..." and record a new fund 10) Click on the button "Edit" then "Duplicate budget ..." in order to duplicate the budget 11) Verify there are two budgets in "Active Budgets" and one in "Inactive Budgets" 12) Click on "Funds" in the menu and verify there are two identical funds and each is associated to a different budget. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 Yohann Dufour <yohann.dufour@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 Chris Cormack <chris@bigballofwax.co.nz> 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=12482 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29277|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 29314 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29314&action=edit Bug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx::Class This patch includes: - removing the use of subroutines InsertInTable, UpdateInTable, SearchInTable replaced by subroutines of DBIx::Class in the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods and admin/aqbudgetperiods.pl - removing old database fields in OrderFromSubscription.t, Bookseller.t, Budgets.t, Serials.t, Serials_2.t - improvement of unit tests in t/db_dependent/Budgets.t - adaptation of calls to the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods in order to match with the use of DBIx::Class Test plan: 1) Execute the UT of all of files wich uses AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod or GetBudgetPeriods by launching the command : prove t/Budgets/ t/Budgets.t t/db_dependent/Budgets.t t/db_dependent/Acquisition.t t/db_dependent/Acquisition/ t/db_dependent/Bookseller.t t/db_dependent/Serials.t t/db_dependent/Serials_2.t 2) The result has to be a success : t/Budgets/CanUserModifyBudget.t ........................... ok t/Budgets/CanUserUseBudget.t .............................. ok t/Budgets.t ............................................... ok t/db_dependent/Budgets.t .................................. ok t/db_dependent/Acquisition.t .............................. ok t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok t/db_dependent/Acquisition/Invoices.t ..................... ok t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2 t/db_dependent/Acquisition/TransferOrder.t ................ ok t/db_dependent/Acquisition/close_reopen_basket.t .......... ok t/db_dependent/Bookseller.t ............................... 16/72 WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/yohann/koha/C4/Bookseller.pm line 135. t/db_dependent/Bookseller.t ............................... ok t/db_dependent/Serials.t .................................. ok t/db_dependent/Serials_2.t ................................ ok All tests successful. Files=14, Tests=571, 22 wallclock secs ( 0.17 usr 0.03 sys + 20.26 cusr 1.10 csys = 21.56 CPU) Result: PASS 3) Go on the page admin/aqbudgetperiods.pl : Koha Administration > Budgets 4) Click on the button "New Budget" and record a new budget with a "nonzero amount" and "make budget active" 5) Click on the button "New Budget" and record another budget without "make budget active" 6) Verify there is the firt budget displayed in "Active budgets" and the second budget in "Inactive budgets" 7) Edit a budget and verify the new values are updated 8) Click on the budget active name in order to go on the page admin/aqbudgets.pl 9) Click on the button "New fund for ..." and record a new fund 10) Click on the button "Edit" then "Duplicate budget ..." in order to duplicate the budget 11) Verify there are two budgets in "Active Budgets" and one in "Inactive Budgets" 12) Click on "Funds" in the menu and verify there are two identical funds and each is associated to a different budget. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 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=12482 Bug 12482 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=12482 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=12482 --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29457 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29457&action=edit Bug 12482 [QA Followup] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 --- Comment #4 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29458 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29458&action=edit [PASSED QA] Bug 12482: removing the use of the module C4::SQLHelper.pm, it is replaced by DBIx::Class This patch includes: - removing the use of subroutines InsertInTable, UpdateInTable, SearchInTable replaced by subroutines of DBIx::Class in the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods and admin/aqbudgetperiods.pl - removing old database fields in OrderFromSubscription.t, Bookseller.t, Budgets.t, Serials.t, Serials_2.t - improvement of unit tests in t/db_dependent/Budgets.t - adaptation of calls to the subroutines AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod and GetBudgetPeriods in order to match with the use of DBIx::Class Test plan: 1) Execute the UT of all of files wich uses AddBudget, ModBudget, GetBudgets, AddBudgetPeriods, ModBudgetPeriod or GetBudgetPeriods by launching the command : prove t/Budgets/ t/Budgets.t t/db_dependent/Budgets.t t/db_dependent/Acquisition.t t/db_dependent/Acquisition/ t/db_dependent/Bookseller.t t/db_dependent/Serials.t t/db_dependent/Serials_2.t 2) The result has to be a success : t/Budgets/CanUserModifyBudget.t ........................... ok t/Budgets/CanUserUseBudget.t .............................. ok t/Budgets.t ............................................... ok t/db_dependent/Budgets.t .................................. ok t/db_dependent/Acquisition.t .............................. ok t/db_dependent/Acquisition/GetBasketsInfosByBookseller.t .. ok t/db_dependent/Acquisition/GetOrdersByBiblionumber.t ...... ok t/db_dependent/Acquisition/Invoices.t ..................... ok t/db_dependent/Acquisition/OrderFromSubscription.t ........ ok t/db_dependent/Acquisition/TransferOrder.t ................ 1/11 # Transfering order to basket2 t/db_dependent/Acquisition/TransferOrder.t ................ ok t/db_dependent/Acquisition/close_reopen_basket.t .......... ok t/db_dependent/Bookseller.t ............................... 16/72 WARNING: GetBooksellerWithLateOrders is called with a negative value at /home/yohann/koha/C4/Bookseller.pm line 135. t/db_dependent/Bookseller.t ............................... ok t/db_dependent/Serials.t .................................. ok t/db_dependent/Serials_2.t ................................ ok All tests successful. Files=14, Tests=571, 22 wallclock secs ( 0.17 usr 0.03 sys + 20.26 cusr 1.10 csys = 21.56 CPU) Result: PASS 3) Go on the page admin/aqbudgetperiods.pl : Koha Administration > Budgets 4) Click on the button "New Budget" and record a new budget with a "nonzero amount" and "make budget active" 5) Click on the button "New Budget" and record another budget without "make budget active" 6) Verify there is the firt budget displayed in "Active budgets" and the second budget in "Inactive budgets" 7) Edit a budget and verify the new values are updated 8) Click on the budget active name in order to go on the page admin/aqbudgets.pl 9) Click on the button "New fund for ..." and record a new fund 10) Click on the button "Edit" then "Duplicate budget ..." in order to duplicate the budget 11) Verify there are two budgets in "Active Budgets" and one in "Inactive Budgets" 12) Click on "Funds" in the menu and verify there are two identical funds and each is associated to a different budget. Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> 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=12482 --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29459 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29459&action=edit [PASSED QA] Bug 12482 [QA Followup] 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=12482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29314|0 |1 is obsolete| | CC| |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=12482 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29457|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=12482 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=12482 --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 29506 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29506&action=edit Bug 12482: (QA followup) coding guidelines for hashrefs As of the public coding guidelines, $$variable{key} usage is discouraged. $variable->{key} should be used instead. Btw, honour the "FIXME - Bug 2505" line :-D Regards To+ Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482 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> --- Patch pushed to master. Thanks Yohann! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org