Tomas Cohen Arazi
d4468c5f33
This uses the work from bug 18098 to use the count of not-onloan items to determine availability. It keeps the allrecords,AlwaysMatches='' portion of the query so it still catches records with the tested indexed missing. These shouldn't exist except in the case of missing data, but kept for future use as well as it has no negative impact and minimizes the change made. Note that availability in this sense means not check out and not lost. Transfers, holds, and not for loan statuses should probably have indexes built in the same way as bug 18098 (there are related FIXMEs in the code) This updates the export_records file used for testing - adding three records with a not-onloan-count (999$x) of 1, but marking the item on the third record lost to prevent its return To test: 1 - make sure SearchEngine pref is set to 'Zebra' 2 - Do a search on the OPAC that returns some records 3 - Find a record in those results with more than one 1 item, and checkout 1 leaving 1 (or more) available 4 - Find another record with only 1 item, check that item out 5 - Limit opac search to available items - both records disappear 6 - Apply patch 7 - Restart all the things 8 - Repeat search 9 - First record should show, but no second 10 - Mark other items of first record as lost, return items on second record 11 - Repeat search, first record should not be in results, second should 12 - prove -v t/db_dependent/Search.t Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> |
||
---|---|---|
.. | ||
Acquisition | ||
Biblio | ||
Budgets | ||
Circulation | ||
db_dependent | ||
edi_testfiles | ||
etc | ||
External | ||
Koha | ||
LangInstaller/templates | ||
lib | ||
Members | ||
Number | ||
Search | ||
Serials | ||
SIP | ||
Test | ||
00-checkdatabase-version.t | ||
00-deprecated.t | ||
00-load.t | ||
00-merge-conflict-markers.t | ||
00-testcritic.t | ||
00-valid-xml.t | ||
Auth.t | ||
Auth_with_shibboleth.t | ||
AuthoritiesMarc_MARC21.t | ||
AuthoritiesMarc_UNIMARC.t | ||
AuthUtils.t | ||
Barcodes_annual.t | ||
Barcodes_EAN13.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 | ||
dummy.t | ||
Edifact.t | ||
EdiInvoice.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_ccn.t | ||
Labels_split_ddcn.t | ||
Labels_split_lccn.t | ||
Labels_split_Regex.t | ||
LangInstaller.t | ||
Languages.t | ||
Letters.t | ||
Log.t | ||
Logger.t | ||
Makefile.t | ||
Matcher.t | ||
Members_Attributes.t | ||
Members_AttributeTypes.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 | ||
perlcriticrc | ||
Prices.t | ||
Print.t | ||
QueryParser.t | ||
RecordProcessor.t | ||
Ris.t | ||
Scheduler.t | ||
Scrubber.t | ||
Search.t | ||
Search_PazPar2.t | ||
SimpleMARC.t | ||
SMS.t | ||
SocialData.t | ||
Stats.t | ||
SuggestionEngine.t | ||
SuggestionEngine_AuthorityFile.t | ||
template_filters.t | ||
timezones.t | ||
TmplToken.t | ||
Token.t | ||
XSLT.t |