[Koha-bugs] [Bug 11677] Limit to Only items currently available for loan or reference not working
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Tue Aug 13 23:33:20 CEST 2019
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11677
Hayley Mapley <hayleymapley at catalyst.net.nz> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|Needs Signoff |Failed QA
--- Comment #32 from Hayley Mapley <hayleymapley at catalyst.net.nz> ---
(In reply to Nick Clemens from comment #31)
> Created attachment 92176 [details] [review]
> Bug 11677: Use zebra not-onloan-count index for availability limit
>
> 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
Hi Nick,
All looks to work as expected, but the tests did not pass for me. Here is the
output, please let me know if there is something I have missed:
kohadev-koha at kohadevbox:/home/vagrant/kohaclone$ prove -v
t/db_dependent/Search.t
t/db_dependent/Search.t ..
1..2
# Subtest: MARC21 + DOM
1..112
ok 1 - use C4::Search;
ok 2 - Title index supported
ok 3 - Accelerated reading level index supported
ok 4 - Accelerated reading point index supported
ok 5 - Found duplicate with ISBN
ok 6 - Found duplicate with author/title
ok 7 - SimpleSearch retrieved requested number of records
ok 8 - SimpleSearch for 'book' matched right number of records
ok 9 - SimpleSearch does not return an error when successful
ok 10 - SimpleSearch cursor functions
ok 11 - SimpleSearch handles simple CCL
ok 12 - SimpleSearch on music publisher number works (bug 8252)
ok 13 - SimpleSearch on music publisher number works using
Identifier-publisher-for-music (bug 8252)
ok 14 - getRecords keyword search for 'book' matched right number of
records
ok 15 - getRecords returned requested number of records
ok 16 - getRecords cursor works
ok 17 - getRecords title search for 'book' matched right number of records
ok 18 - getRecords title search for 'Australia' matched right number of
records
ok 19 - Simple relevance sorting in getRecords matches old behavior
ok 20 - Simple ascending author sorting in getRecords matches old behavior
ok 21 - Simple descending author sorting in getRecords matches old behavior
ok 22 - Simple ascending publication date sorting in getRecords matches old
behavior
ok 23 - Simple descending publication date sorting in getRecords matches
old behavior
ok 24 - Scan returned requested item
ok 25 - Scan returned correct number of records matching term
ok 26 - Built CCL keyword query
ok 27 - getRecords generated keyword search for 'salud' matched right
number of records
ok 28 - searchResults returns requested number of hits
ok 29 - Built composed explicit-and CCL keyword query
ok 30 - getRecords generated composed keyword search for 'salud'
explicit-and 'higiene' matched right number of records
ok 31 - Built composed explicit-or CCL keyword query
ok 32 - getRecords generated composed keyword search for 'salud'
explicit-or 'higiene' matched right number of records
ok 33 - Built composed implicit-and CCL keyword query
ok 34 - getRecords generated composed keyword search for 'salud'
implicit-and 'higiene' matched right number of records
ok 35 - Faceted query generated correctly
ok 36 - Facets not included in query description
ok 37 - getRecords generated faceted search matched right number of records
ok 38 - getRecords generated mc-faceted search matched right number of
records
ok 39 - getRecords generated multi-faceted search matched right number of
records
ok 40 - search using index whose name contains "ns" returns expected
results (bug 10271)
ok 41 - Search for 'book' with index set to 'kw' returns 101 hits
ok 42 - Search for 'kw:book && kw:another' returns 1 hit
ok 43 - getRecords generated availability-limited search matched right
number of records
not ok 44 - All records have at least one item available
# Failed test 'All records have at least one item available'
# at t/db_dependent/Search.t line 510.
# got: 'false'
# expected: 'true'
ok 45 - getRecords on _ALLRECORDS PQF returned all records
ok 46 - getRecords PQF author search for Lessig returned proper number of
matches
ok 47 - getRecords CCL author search for Lessig returned proper number of
matches
ok 48 - getRecords CQL author search for Lessig returned proper number of
matches
ok 49 - Weighted query returned correct number of results
ok 50 - Weighted query returns best match first
ok 51 - Search for 'medic' returns matches with automatic truncation on
ok 52 - Search for 'medic*' returns matches with automatic truncation on
ok 53 - Search for 'web application' returns one hit with QueryWeightFields
on
ok 54 - Search for 'web "application' returns one hit with
QueryWeightFields on (bug 7518)
ok 55 - Search for 'medic' returns no matches with automatic truncation off
ok 56 - Search for 'medic*' returns matches with automatic truncation off
ok 57 - Search for 'pressed' returns matches when stemming (and query
weighting) is on
ok 58 - Search for 'pressed' returns no matches when stemming is off
ok 59 - buildQuery should add the available part to the query if requested
with ccl
ok 60 - buildQuery should remove the available part from the query
ok 61 - buildQuery should keep 0 value
ok 62 - SimpleSearch warns about CCL parsing error with nonsense query
ok 63 - SimpleSearch returns an error when passed gibberish
ok 64 - getRecords warns about unknown query type
ok 65 - getRecords warns when query type is not specified for non-CCL query
ok 66 - Alternate holdings filled in correctly
ok 67 - presence of a transit does not block hold request action (bug
10741)
ok 68 - search for ti:punctuation returned expected number of records
ok 69 - Warning is raised correctly for invalid tags in MARC::Record
ok 70 - a record that cannot be parsed by MARC::Record is simply skipped
(bug 10684)
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 71 - Searching for expected term 'Arizona' for exploding
ok 72 - Advanced search for broader subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 73 - Searching for expected term 'Arizona' for exploding
ok 74 - Advanced search for narrower subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 75 - Searching for expected term 'Arizona' for exploding
ok 76 - Advanced search for related subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 77 - Searching for expected term 'Arizona' for exploding
ok 78 - Advanced search for related subjects and keyword 'history' searches
related subjects
ok 79 - Advanced search for related subjects and keyword 'history' searches
for 'history'
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 80 - Searching for expected term 'Arizona' for exploding
ok 81 - Order of terms doesn't matter for advanced search
ok 82 - Order of terms doesn't matter for advanced search
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 83 - Searching for expected term 'Arizona' for exploding
ok 84 - Simple search for broader subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 85 - Searching for expected term 'Arizona' for exploding
ok 86 - Simple search for narrower subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 87 - Searching for expected term 'Arizona' for exploding
ok 88 - Simple search for related subjects
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan.pm line 53.
ok 89 - Searching for expected term 'Arizona' for exploding
ok 90 - Simple search for related subjects and keyword 'history' searches
related subjects
ok 91 - Simple search for related subjects and keyword 'history' searches
for 'history'
ok 92 - use C4::AuthoritiesMarc;
ok 93 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
ok 94 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
sorted by heading ascending
ok 95 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
sorted by heading descending
ok 96 - MARC21 authorities: one hit on match contains "沙士北亞威廉姆"
ok 97 - MARC21 authorities: one hit on LC-card-number contains "99282477"
ok 98 - MARC21 authorities: one hit on "all" (entire record) contains
"professional wrestler"
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan/node.pm line
102.
ok 99 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
(QP)
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan/node.pm line
102.
ok 100 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
sorted by heading ascending (QP)
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan/node.pm line
102.
ok 101 - MARC21 authorities: one hit on mainentry starts with "shakespeare"
sorted by heading descending (QP)
Negative repeat count does nothing at
/home/vagrant/kohaclone/Koha/QueryParser/Driver/PQF/query_plan/node.pm line
102.
ok 102 - MARC21 authorities: one hit on match contains "沙士北亞威廉姆" (QP)
ok 103 - Can do a search that retrieves an over-large bib record (bug
11096)
ok 104 - Able to render the title for over-large bib record (bug 11096)
ok 105 - Over-large bib record has the correct biblionumber (bug 11096)
ok 106 - Able to render the notes field for over-large bib record (bug
11096)
ok 107 - 'notforloancount' defined in searchResults output (Bug 12419)
ok 108 - 'notforloancount' == 2 (Bug 12419)
ok 109 - got warning instead of crash when attempting to run invalid query
(bug 9578)
ok 110 - _get_facets_data_from_record doesn't count 100$z (Bug 12788)
ok 111 - _get_facets_data_from_record correctly counts author facet twice
ok 112 - _get_facets_info returns the correct data
# Looks like you failed 1 test of 112.
not ok 1 - MARC21 + DOM
# Failed test 'MARC21 + DOM'
# at t/db_dependent/Search.t line 973.
# Subtest: UNIMARC + DOM
1..14
ok 1 - use C4::Search;
ok 2 - UNIMARC title search
ok 3 - UNIMARC target audience = u
ok 4 - UNIMARC target audience = k
ok 5 - UNIMARC target audience = m
ok 6 - UNIMARC generic item index (bug 10037)
ok 7 - use C4::AuthoritiesMarc;
ok 8 - UNIMARC authorities: hits on mainentry contains "wil"
ok 9 - UNIMARC authorities: hits on match contains "wil"
ok 10 - UNIMARC authorities: hits on mainentry contains "michel"
ok 11 - UNIMARC authorities: hits on mainmainentry = "valley"
ok 12 - UNIMARC authorities: no hits on mainmainentry = "vall"
ok 13 - UNIMARC authorities: hits on any starts with "jean"
ok 14 - _get_facets_info returns the correct data
ok 2 - UNIMARC + DOM
# Looks like you failed 1 test of 2.
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/2 subtests
Test Summary Report
-------------------
t/db_dependent/Search.t (Wstat: 256 Tests: 2 Failed: 1)
Failed test: 1
Non-zero exit status: 1
Files=1, Tests=2, 10 wallclock secs ( 0.03 usr 0.02 sys + 5.47 cusr 1.24
csys = 6.76 CPU)
Result: FAIL
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list