From 0f3a04609cb85b454252226915e76ff277af7054 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 12 Nov 2014 10:02:15 +0100 Subject: [PATCH] Bug 13232: Search patrons by a first letter should not redirect to a patron detail page Bug 12833 allows to find a patron with his cardnumber. But this won't never append if the firstletter parameter is given. Actually the firstletter param is the only one to take into account if it exists. Test plan: Search patrons by a first letter and verify that the feature is back. Signed-off-by: Chris Cormack To reproduce the problem you need at least one borrower with a blank cardnumber Signed-off-by: Katrin Fischer works as descrobed, no problems found. Signed-off-by: Tomas Cohen Arazi --- svc/members/search | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/svc/members/search b/svc/members/search index e0b64a50fa..735925822d 100755 --- a/svc/members/search +++ b/svc/members/search @@ -58,7 +58,12 @@ foreach (grep {$_ =~ /^mDataProp/} keys %dt_params) { } my $results; -if ( $searchfieldstype and $searchfieldstype eq 'standard' ) { +# If the user filled a term, maybe it's a cardnumber. +# This cannot be the case if a first letter is given. +if ( not $firstletter + and $searchfieldstype + and $searchfieldstype eq 'standard' ) +{ my $member = C4::Members::GetMember( cardnumber => $searchmember ); $results = { iTotalRecords => 1, -- 2.11.0