[Koha-bugs] [Bug 22284] Groups of pickup locations for holds

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Apr 25 18:31:13 CEST 2019


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22284

Agustín Moyano <agustinmoyano at theke.io> changed:

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

--- Comment #26 from Agustín Moyano <agustinmoyano at theke.io> ---
Created attachment 88799
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=88799&action=edit
Bug 22284: Opac pickup_locations

This patch modifies Koha::Libraries->pickup_location and moves most of the
logic to
Koha::Item and Koha::Biblio in preparation for api endpoints in the future.

There where 2 methods added

1) Koha::Item->pickup_locations that given a patron, returns all pickup
locations of
this item, considering hold fulfillment rules, and hold allowed rules.

2) Koha::Biblio->pickup_locations that given a patron, returns a distinct list
of
libraries returned by each of this biblio items pickup location.

Koha::Libraries->pickup_location analyzes input param and calls
Koha::Item->pickup_locations
or Koha::Biblio->pickup_locations as needed.

Also in opac-reserve.tt the way options where obtained to fill the pickup
location select
was modified to pass the patron as a parameter.

To test:
1) opac: try to place hold on a item and check that all libraries are shown in
the
pickup location select.
2) intranet: in Library groups, add 2 root groups marked as local hold group
and
add different libraries to each.
3) opac: login as a user of a library belonging to one hold group, and search
try to
place a hold on an item belongin to the other hold group.
4) intranet: in Circulation and fines rules, play with 'Hold policy' and 'Hold
pickup
library match' rules.
5) opac: On each modification of the rules reload the page.
SUCCESS => Every time you reload the page, the number of pickup locations
showed in
select varies.
6) prove t/db_dependent/Koha/Biblios.t t/db_dependent/Koha/Items.t
SUCCESS => Result: PASS
7) Sign off

Sponsored-by: VOKAL

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


More information about the Koha-bugs mailing list