[Koha-patches] [PATCH] Bug 6488 - followup - fixes issue with bibs with no items and serials being suppressed

Liz Rea wizzyrea at gmail.com
Fri Feb 17 22:35:38 CET 2012


To test:

* create a bib with no items
* update your index
	serial records and your new bib with no items should be displayed.
* add something to the OPACHiddenItems syspref (I like itype: [BK] from the test data)
*** test both ways, with something in there and with the syspref empty.
* add an item to your new bib that would be suppressed
* update your index
* search for the bib
	The item should not show
* change the item into a state where it would no longer be suppressed
* update your index
* search for the bib
	The item should show in the opac
* just for fun, delete your item
* update your index
* Search for the bib - it should still display.

I tested on MARC21 - please test UNIMARC as well.

http://bugs.koha-community.org/show_bug.cgi?id=7386
---
 C4/Search.pm |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index c4276a3..e326986 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1758,10 +1758,10 @@ sub searchResults {
                 }
             }
         }    # notforloan, item level and biblioitem level
-
+	if ($items_count > 0) {
         next if $is_opac       && $hideatopac_count >= $items_count;
         next if $hidelostitems && $itemlost_count   >= $items_count;
-
+	}
         my ( $availableitemscount, $onloanitemscount, $otheritemscount );
         for my $key ( sort keys %$onloan_items ) {
             (++$onloanitemscount > $maxitems) and last;
-- 
1.7.5.4



More information about the Koha-patches mailing list