]> git.koha-community.org Git - koha.git/commit
Bug 23830: Adapt callers
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 28 Jan 2021 20:23:45 +0000 (17:23 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 8 Feb 2021 16:09:34 +0000 (17:09 +0100)
commitba5eff837b9d6d004ada5d7289c2c1b7b07ce544
tree710f4917f77f7789770323cd3ddd23f99860f97e
parentf24b281057fd6a52e59da3ff5136a5aee88b5acb
Bug 23830: Adapt callers

This patch is the result of making the same changes we did on the
t/db_dependent/AuthorisedValues.t file (replacing the calls to
Koha::AuthorisedValues->search with the tricky branchcode param, and
call ->search_with_library_limits, with the library_id as a third
parameter.

What I did was:
   $ git grep 'Koha::AuthorisedValues\->search'

and then revisited each of the grep results to check if they added the
'branchcode' parameter to the filters.

This patch changes the calls to ->search, for
->search_with_library_limits in all the places that require it in the
current codebase [1].

To test:
1. Apply this patch
2. Run:
   $ kshell
  k$ prove t/db_dependent/Koha/Charges/Sales.t \
           t/db_dependent/Ill*
3. Verify the batchmod.pl script is working and filtering the authorised
   values keeps working

[1] Some places like the Koha/Template/Plugin/AuthorisedValues.pm plugin
don't seem to be tested, at first glance.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/Charges/Sales.pm
Koha/Illrequest.pm
Koha/Template/Plugin/AuthorisedValues.pm
acqui/ajax-getauthvaluedropbox.pl
tools/batchMod.pl