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 | ||
| Biblio | ||
| Budgets | ||
| Circulation | ||
| External | ||
| Koha | ||
| LangInstaller/templates | ||
| Members | ||
| Number | ||
| SIP | ||
| Search | ||
| Serials | ||
| Test | ||
| db_dependent | ||
| edi_testfiles | ||
| etc | ||
| lib | ||
| 00-checkdatabase-version.t | ||
| 00-deprecated.t | ||
| 00-load.t | ||
| 00-merge-conflict-markers.t | ||
| 00-testcritic.t | ||
| 00-valid-xml.t | ||
| Auth.t | ||
| AuthUtils.t | ||
| Auth_with_shibboleth.t | ||
| AuthoritiesMarc_MARC21.t | ||
| AuthoritiesMarc_UNIMARC.t | ||
| Barcodes_EAN13.t | ||
| Barcodes_annual.t | ||
| Barcodes_hbyymmincr.t | ||
| Barcodes_incremental.t | ||
| Biblio.t | ||
| Biblio2.t | ||
| Bookseller.t | ||
| Boolean.t | ||
| Budgets.t | ||
| Calendar.t | ||
| Charset.t | ||
| Circulation_barcodedecode.t | ||
| ClassSortRoutine.t | ||
| ClassSortRoutine_Dewey.t | ||
| ClassSortRoutine_Generic.t | ||
| ClassSortRoutine_LCC.t | ||
| ClassSource.t | ||
| Context.t | ||
| Contract.t | ||
| Creators.t | ||
| DateUtils.t | ||
| Debug.t | ||
| EdiInvoice.t | ||
| EdiTransport.t | ||
| Edifact.t | ||
| Ediorder.t | ||
| Ediordrsp.t | ||
| Form_MessagingPreferences.t | ||
| HtmlTags.t | ||
| Images.t | ||
| ImportBatch.t | ||
| Installer_PerlDependencies.t | ||
| Installer_PerlModules.t | ||
| Installer_pm.t | ||
| ItemCirculationAlertPreference.t | ||
| Koha.t | ||
| Koha_Email.t | ||
| Koha_MetadataRecord.t | ||
| Koha_Template_Plugin_Cache.t | ||
| Koha_Template_Plugin_Koha.t | ||
| Koha_Util_FrameworkPlugin.t | ||
| Koha_Util_MARC.t | ||
| Labels.t | ||
| Labels_split_Regex.t | ||
| Labels_split_ccn.t | ||
| Labels_split_ddcn.t | ||
| Labels_split_lccn.t | ||
| LangInstaller.t | ||
| Languages.t | ||
| Letters.t | ||
| Log.t | ||
| Logger.t | ||
| Makefile.t | ||
| Matcher.t | ||
| Members_AttributeTypes.t | ||
| Members_Attributes.t | ||
| Members_Messaging.t | ||
| OpenLibrarySearch.t | ||
| Output.t | ||
| Output_JSONStream.t | ||
| Patron.t | ||
| Patroncards.t | ||
| Patroncards_Batch.t | ||
| Patroncards_Lib.t | ||
| Patroncards_Patroncard.t | ||
| Patroncards_Profile.t | ||
| Patroncards_Template.t | ||
| Prices.t | ||
| Print.t | ||
| QueryParser.t | ||
| RecordProcessor.t | ||
| Ris.t | ||
| SMS.t | ||
| Scheduler.t | ||
| Scrubber.t | ||
| Search.t | ||
| Search_PazPar2.t | ||
| SimpleMARC.t | ||
| SocialData.t | ||
| Stats.t | ||
| SuggestionEngine.t | ||
| SuggestionEngine_AuthorityFile.t | ||
| TmplToken.t | ||
| Token.t | ||
| XSLT.t | ||
| dummy.t | ||
| perlcriticrc | ||
| template_filters.t | ||
| timezones.t | ||