f668fecec3
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 Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Liz Rea <wizzyrea@gmail.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> |
||
---|---|---|
.. | ||
Acquisition | ||
api/v1 | ||
Auth | ||
Authority | ||
Biblio | ||
Circulation | ||
CourseReserves | ||
Creators | ||
cronjobs | ||
data | ||
Exporter | ||
Holds | ||
Illrequest | ||
Items | ||
Koha | ||
Labels | ||
LDAP | ||
Letters | ||
Members | ||
OAI | ||
Patron | ||
Record | ||
Reports | ||
Reserves | ||
Search | ||
selenium | ||
Serials | ||
SIP | ||
Template/Plugin | ||
Utils | ||
www | ||
XSLT_Handler | ||
00-strict.t | ||
01-test_dbic.t | ||
Accounts.t | ||
Acquisition.t | ||
Amazon.t | ||
ArticleRequests.t | ||
AudioAlerts.t | ||
Auth.t | ||
Auth_with_cas.t | ||
Auth_with_ldap.t | ||
AuthorisedValues.t | ||
AuthoritiesMarc.t | ||
BackgroundJob.t | ||
Barcodes.t | ||
Barcodes_ValueBuilder.t | ||
Biblio.t | ||
Bookseller.t | ||
Breeding.t | ||
Budgets.t | ||
Cache.t | ||
Calendar.t | ||
Charset.t | ||
check_kohastructure.t | ||
check_sysprefs.t | ||
Circulation.t | ||
Clubs.t | ||
ColumnsSettings.t | ||
Context.t | ||
Contract.t | ||
CourseReserves.t | ||
db_structure.t | ||
DecreaseLoanHighHolds.t | ||
default_search_class.pl | ||
Filter_MARC_ViewPolicy.t | ||
Fines.t | ||
FrameworkPlugin.t | ||
Heading.t | ||
Heading_MARC21.t | ||
Hold.t | ||
Holds.t | ||
HoldsQueue.t | ||
Holidays.t | ||
Illcomments.t | ||
Illrequestattributes.t | ||
Illrequests.t | ||
ILSDI_Services.t | ||
ImportBatch.t | ||
ImportExportFramework.t | ||
Installer.t | ||
Items.t | ||
Items_DelItemCheck.t | ||
Koha.t | ||
Koha_Authority.t | ||
Koha_Database.t | ||
Koha_Elasticsearch.t | ||
Koha_ExternalContent_OverDrive.t | ||
Koha_ExternalContent_RecordedBooks.t | ||
Koha_Misc_Files.t | ||
Languages.t | ||
Letters.t | ||
LibraryGroups.t | ||
Linker_Default.t | ||
Linker_FirstMatch.t | ||
Log.t | ||
MarcModificationTemplates.t | ||
Members.t | ||
MungeMarcPrice.t | ||
NewsChannels.t | ||
Overdues.t | ||
Passwordrecovery.t | ||
Patroncards.t | ||
PatronLists.t | ||
Patrons.t | ||
QueryParser.t | ||
Record.t | ||
RecordProcessor_EmbedSeeFromHeadings.t | ||
RefundLostItemFeeRule.t | ||
Reports.t | ||
Reserves.t | ||
rollingloans.t | ||
RotatingCollections.t | ||
Search.t | ||
Serials.t | ||
Serials_2.t | ||
Service.t | ||
ShelfBrowser.t | ||
Sitemapper.t | ||
Stats.t | ||
StockRotationItems.t | ||
StockRotationRotas.t | ||
StockRotationStages.t | ||
SuggestionEngine_ExplodedTerms.t | ||
Suggestions.t | ||
sysprefs.t | ||
Tags.t | ||
Templates.t | ||
TestBuilder.t | ||
Upload.t | ||
UsageStats.t | ||
Virtualshelves.t | ||
XISBN.t | ||
XSLT.t | ||
XSLT_Handler.t | ||
zebra_config.pl |