Bug 17838 - Availability limit broken until an item has been checked out
Summary: Availability limit broken until an item has been checked out
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal (vote)
Assignee: Zoe Schoeler
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-01-03 21:36 UTC by Katrin Fischer
Modified: 2018-06-04 20:09 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17838 Availability limit broken until an item has been checked out. (1014 bytes, patch)
2017-01-18 01:09 UTC, Zoe Schoeler
Details | Diff | Splinter Review
[SIGNED OFF] Bug 17838 Availability limit broken until an item has been checked out. (1.06 KB, patch)
2017-01-18 02:14 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 17838 Availability limit broken until an item has been checked out. (1.37 KB, patch)
2017-01-26 12:58 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2017-01-03 21:36:32 UTC
The availability limit in the OPAC will return on results, until an item has been checked out for the first time.

From the mailing list:


The index doesn't exist, so the query fails, the index just has to exist
(which it does as soon as something is circulated, it will continue to
work if you return that item, the index doesn't go away, unless you do a
full reindex and have not circulated anything ever)
In practice people don't run into this much at all. However the fix is
just in the ccl.properties file

/etc/koha/zebradb/ccl.properties

change line 1032

From
onloan 1=8024
to
onloan 1=8024 14=1

And it will work even if you library has never done a circulation
operation
Comment 1 Zoe Schoeler 2017-01-18 01:09:05 UTC
Created attachment 59130 [details] [review]
Bug 17838 Availability limit broken until an item has been checked out.

TEST PLAN

1. Make sure you have no items checked out.
2. Run sudo koha-rebuild-zebra -f -v kohadev.
3. Go to search the catalog and search.
4. Check items availability and then click on limit to currently
available items.
5. This should return no results.
6. Apply patch and reload.
7. Results should show.
Comment 2 Katrin Fischer 2017-01-18 02:14:44 UTC
Created attachment 59133 [details] [review]
[SIGNED OFF] Bug 17838 Availability limit broken until an item has been checked out.

TEST PLAN

1. Make sure you have no items checked out.
2. Run sudo koha-rebuild-zebra -f -v kohadev.
3. Go to search the catalog and search.
4. Check items availability and then click on limit to currently
available items.
5. This should return no results.
6. Apply patch and reload.
7. Results should show.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 3 Jonathan Druart 2017-01-26 12:58:13 UTC
Created attachment 59582 [details] [review]
Bug 17838 Availability limit broken until an item has been checked out.

TEST PLAN

1. Make sure you have no items checked out.
2. Run sudo koha-rebuild-zebra -f -v kohadev.
3. Go to search the catalog and search.
4. Check items availability and then click on limit to currently
available items.
5. This should return no results.
6. Apply patch and reload.
7. Results should show.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Attribute 14: " Specifies whether un-indexed fields should be ignored. A
zero value (default) throws a diagnostic when an un-indexed field is
specified. A non-zero value makes it return 0 hits."
From http://www.indexdata.com/zebra/doc/querymodel-zebra.html
Comment 4 Kyle M Hall 2017-02-14 14:05:41 UTC
Pushed to master for 17.05, thanks Zoe!
Comment 5 Katrin Fischer 2017-02-14 20:22:46 UTC
This patch has been pushed to 16.11.x and will be in 16.11.04.
Comment 6 Julian Maurice 2017-02-20 09:34:16 UTC
Pushed to 3.22.x for 3.22.17
Comment 7 Mason James 2017-02-23 20:21:13 UTC
Pushed to 16.05.x, for 16.05.10 release