From b305e20d4ca8e4b5778d113d35a05648af6abc4d Mon Sep 17 00:00:00 2001 From: senator Date: Wed, 7 Apr 2010 15:09:50 +0000 Subject: [PATCH] Acq: fix a problem when searching by user-linked fields git-svn-id: svn://svn.open-ils.org/ILS/trunk@16156 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../OpenILS/Application/Acq/Search.pm | 21 +++++++------------ 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm index d1d34477eb..5090c53e0a 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm @@ -135,25 +135,20 @@ sub get_fm_links_by_hint { sub gen_au_term { my ($value, $n) = @_; +{ - "-or" => { - "+au$n" => { - "-or" => { - "usrname" => $value, - "alias" => $value, - "first_given_name" => $value, - "second_given_name" => $value, - "family_name" => $value - } - }, - "+ac$n" => {"barcode" => $value} - } + "-or" => [ + {"+au$n" => {"usrname" => $value}}, + {"+au$n" => {"first_given_name" => $value}}, + {"+au$n" => {"second_given_name" => $value}}, + {"+au$n" => {"family_name" => $value}}, + {"+ac$n" => {"barcode" => $value}} + ] }; } # go through the terms hash, find keys that correspond to fields links # to actor.usr, and rewrite the search as one that searches not by # actor.usr.id but by any of these user properties: card barcode, username, -# alias, given names and family name. +# given names and family name. sub prepare_au_terms { my ($terms, $join_num) = @_; -- 2.43.2