[open-ils-commits] r16156 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq (senator)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Apr 7 11:09:53 EDT 2010
Author: senator
Date: 2010-04-07 11:09:50 -0400 (Wed, 07 Apr 2010)
New Revision: 16156
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
Log:
Acq: fix a problem when searching by user-linked fields
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm 2010-04-07 14:55:14 UTC (rev 16155)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Acq/Search.pm 2010-04-07 15:09:50 UTC (rev 16156)
@@ -135,25 +135,20 @@
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) = @_;
More information about the open-ils-commits
mailing list