Bug 17838

Summary: Availability limit broken until an item has been checked out
Product: Koha Reporter: Katrin Fischer <katrin.fischer>
Component: SearchingAssignee: Zoe Schoeler <crazy.mental.onion>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: crazy.mental.onion, julian.maurice, kyle, mtj
Version: unspecifiedKeywords: Academy
Hardware: All   
OS: All   
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.
[SIGNED OFF] Bug 17838 Availability limit broken until an item has been checked out.
Bug 17838 Availability limit broken until an item has been checked out.

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