[Koha-bugs] [Bug 12482] C4::Budgets : Replacement of subroutine calls of C4::SQLHelper by DBIx::Class

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 27 00:59:05 CEST 2014


http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12482

Chris Cormack <chris at bigballofwax.co.nz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #29277|0                           |1
        is obsolete|                            |

--- Comment #2 from Chris Cormack <chris at 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 at catalyst.net.nz>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list