]> git.koha-community.org Git - koha.git/commit
Bug 23830: Make Koha::AuthorisedValues use Koha::Objects::Limit::Library
authorTomas Cohen Arazi <tomascohen@theke.io>
Thu, 28 Jan 2021 20:16:24 +0000 (17:16 -0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 8 Feb 2021 16:09:34 +0000 (17:09 +0100)
commitf24b281057fd6a52e59da3ff5136a5aee88b5acb
treecd7d20d7eb35317101313f9dd461aab1df5ef102
parent8fbfa9da187341d892f230b30ff1d5cf85357293
Bug 23830: Make Koha::AuthorisedValues use Koha::Objects::Limit::Library

This patch makes Koha::AuthorisedValues inherit the
'search_with_library_limits' method from Koha::Objects::Limit::Library.
This was left out of the original implementation and this patch makes
this library have a similar implementation to that of Koha::ItemTypes,
etc.

To test:
1. Run:
   $ kshell
  k$ prove t/db_dependent/AuthorisedValues.t
=> SUCCESS: Tests pass!
2. Apply this patch
3. Notice Koha::AuthorisedValues now inherits this new library
4. Notice the overloaded ->search method is removed
5. Repeat (1)
=> SUCCESS: The behavior of the newly used method on the tests is the
same as before. We only changed the method name and how we pass the
library_id.
6. Sign off :-D

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Koha/AuthorisedValues.pm
t/db_dependent/AuthorisedValues.t