[Koha-patches] [PATCH 2/2] Bug 7318 - filtering patron card creator by category code does nothing

Liz Rea wizzyrea at gmail.com
Thu Feb 16 03:23:09 CET 2012


This patch should fix the search issue - do note you have to use the *code* and not the *description*

To test:
* replicate the bug:
	* do a patron search in the patron card creator, with the sample data installed, for category code PT - you should get results from all category codes.
* Apply the patch
* do a patron search in the patron card creator, with the sample data installed, for category code PT
* you will get only results in patron category PT.
---
 patroncards/members-search.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/patroncards/members-search.pl b/patroncards/members-search.pl
index 276814a..6c27095 100755
--- a/patroncards/members-search.pl
+++ b/patroncards/members-search.pl
@@ -60,7 +60,7 @@ $member =~ s/,//g;   #remove any commas from search string
 $member =~ s/\*/%/g;
 
 if ($member || $category) {
-    my $results = $category ? Search({''=>$member, category_type=>$category}, $orderby)
+    my $results = $category ? Search({''=>$member, categorycode=>$category}, $orderby)
                             : Search($member, $orderby);
     my $count = $results ? @$results : 0;
 
-- 
1.7.5.4



More information about the Koha-patches mailing list