From: senator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Date: Wed, 7 Apr 2010 15:09:50 +0000 (+0000)
Subject: Acq: fix a problem when searching by user-linked fields
X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=b305e20d4ca8e4b5778d113d35a05648af6abc4d;p=evergreen%2Fpines.git

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
---

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) = @_;