Bug 18094: Only search in searchable patron attributes if searching in standard fields
Test plan: - Add a new patron attrbute and mark it searchable - Populate a new patron with 'potato' in that field - Add/edit another patron to have email potato@invalidemail.com' - Perform a patron search with query 'potato' (in standard fields) => Both patrons are returned - Perform a patron search with filters 'Email' and query 'potato' => Only 1 patron is returned and you are redirected to the patron detail page. Followed test plan, works as expected. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Brendan A Gallagher <brendan@bywatersolutions.com>
This commit is contained in:
parent
f86500351a
commit
5823d4ca6a
|
|
@ -120,7 +120,7 @@ sub search {
|
|||
push @where_args, $term;
|
||||
}
|
||||
|
||||
if ( C4::Context->preference('ExtendedPatronAttributes') and $searchmember ) {
|
||||
if ( $searchfieldstype eq 'standard' and C4::Context->preference('ExtendedPatronAttributes') and $searchmember ) {
|
||||
my $matching_borrowernumbers = C4::Members::Attributes::SearchIdMatchingAttribute($searchmember);
|
||||
|
||||
for my $borrowernumber ( @$matching_borrowernumbers ) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue