Created attachment 8122 [details]
lost items showing in results
In the OPAC if you are not using XSLT lost items show in the results even if you have hidelostitems set to not show them.
Created attachment 11498 [details] [review]
Main problem is that in opac-results.tt, the hidden items are managed in available items loop, but they are in others loop.
Second problem is that adding hidden items in other items list will give false lost/damaged/withdrawn/onloan/onhold/... count number.
Since these items are not displayed, there is no need to send them to template.
So i changed behavior : if item is hidden it is not in item loops.
Test plan :
Check display with 'OpacHiddenItems' syspref hidding some items and all items.
Check display with 'hidelostitems' syspref hidding some lost items and all items.
Combine with and without XSLT.
Test with bug 6488 tests : http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=6488#c45
Is this still a problem?I can't reproduce it and also if we're going to remove hidelostitems (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8619) do we need this patch?
(In reply to comment #2)
> Is this still a problem?I can't reproduce it and also if we're going to
> remove hidelostitems
> (http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=8619) do we need
> this patch?
Yes it is still a problem, this bug concerns hidelostitems but also OpacHiddenItems behavior.
I forgot : to reproduce the but, hidden items must be unavailable (on loan, damaged, not for loan ...).
Tell me if you need a better test plan.
I had lost items hidden in the opac and then did a search with XSLT turned off and lost items were hidden without this patch. A lost item won't be checked out in most cases, so the item was not checked out.
On my test environment (master revision and sandbox 2 database), I reproduce the bug.
hilelostitems is active. With 1 item available and 1 lost (itemlost=1), I get :
Availability: Copies available: Le Cannet (1), Lost (1).
Result page gets items from Zebra so after editing an item, don't forget to rebuild.
Created attachment 11878 [details] [review]
[SIGNED-OFF] Bug 7690: hidelostitems not working in Normal Display
Signed-off-by: Owen Leonard <firstname.lastname@example.org>
Tested by toggling both the hidelostitems preference and the
OpacHiddenItems preference. Both work as expected in the normal
search results display.
(In reply to comment #6)
> Created attachment 11878 [details] [review]
> [SIGNED-OFF] Bug 7690: hidelostitems not working in Normal Display
> Signed-off-by: Owen Leonard <email@example.com>
patch looks good, passing QA…
testing 1 commit(s) (applied to commit 0acebb8)
* f14ca82 Bug 7690: hidelostitems not working in Normal Display
* C4/Search.pm OK
* koha-tmpl/opac-tmpl/prog/en/modules/opac-results.tt OK
Patch pushed to master
Template change, but no string changes, pushing to 3.8.x will be in 3.8.5