]> git.koha-community.org Git - koha.git/commit
Bug 25421: Remove use of Koha::Libraries->pickup_locations
authorTomas Cohen Arazi <tomascohen@theke.io>
Fri, 8 May 2020 13:04:30 +0000 (10:04 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 12 May 2020 10:00:14 +0000 (11:00 +0100)
commit6aeeae3e707d449403ad08914acfdb6b7a1e831f
tree53a8e36a3697738e7559963f4120c8ed89d7f460
parent6f1e9fe75080b9a02c49730cbdb341cf09ca9826
Bug 25421: Remove use of Koha::Libraries->pickup_locations

The current implementation uses Koha::Libraries->pickup_locations which
is problematic and due to be removed by bug 24368. This patch makes the
trivial change of just searching for libraries that are marked with
pickup_location => 1.

Calls to Koha::Item->pickup_locations and Koha::Biblio->pickup_locations
are as well adapted to the new arrayref return value.

To test:
1. Pick a record with only one item
2. Place a biblio-level hold on it
3. Edit the items: remove the item
4. Go to the Holds tab
=> FAIL: It explodes
5. Apply this patch and restart:
   $ sudo koha-plack --restart kohadev
6. Go back and go to the holds tab again
=> SUCCESS: No failure!
7. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Didier Gautheron <didier.gautheron@biblibre.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Koha/Template/Plugin/Branches.pm