From: Bill Erickson Date: Wed, 29 Oct 2014 21:05:33 +0000 (-0400) Subject: KMIG-53 : KCLSUPGRAD-28 : Patron search by record number missing X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=39b6d2603ca3ad5c2ab6a24e290f6c6d07addb06;p=working%2FEvergreen.git KMIG-53 : KCLSUPGRAD-28 : Patron search by record number missing Cross-port: 518726b Conflicts: Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm index 0c1f0a5cad..efea242b9d 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Publisher/actor.pm @@ -757,6 +757,7 @@ sub patron_search { my $iv = _clean_regex_chars($$search{ident}{value}); my $nv = _clean_regex_chars($$search{name}{value}); my $cv = _clean_regex_chars($$search{card}{value}); + my $egv = _clean_regex_chars($$search{egid}{value}); my $card = ''; if ($cv) { @@ -764,6 +765,15 @@ sub patron_search { unshift(@usrv, $cv); } + # for Evergreen usr id search + my $egid = ''; + $_ = $egv; + if (m/\D/) { + $egid = ' AND FALSE'; + } elsif ($egv) { + $egid = ' AND users.id = ' . $egv; + } + my $phone = ''; my @ps; my @phonev; @@ -894,6 +904,7 @@ sub patron_search { WHERE users.deleted = FALSE $inactive $opt_in_where + $egid GROUP BY $group_list ORDER BY $order_by LIMIT $limit diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index ef72fec206..42240bc3dd 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -1702,6 +1702,8 @@ + + diff --git a/Open-ILS/xul/staff_client/server/patron/search_form.js b/Open-ILS/xul/staff_client/server/patron/search_form.js index 000e70006c..48b3b165fd 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form.js +++ b/Open-ILS/xul/staff_client/server/patron/search_form.js @@ -127,6 +127,19 @@ patron.search_form.prototype = { }; } ], + 'egid' : [ + ['render'], + function(e) { + return function() { + if (params.query&¶ms.query.egid) { + e.setAttribute('value',params.query.egid); + e.value = params.query.egid; + } else { + e.value = ''; + } + }; + } + ], 'email' : [ ['render'], function(e) { @@ -372,7 +385,7 @@ patron.search_form.prototype = { if (id == 'search_depth') { query[id] = node.firstChild.getAttribute('value'); } else { - var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,''); + var value = node.value.replace(/^\s+/,'').replace(/[\\\s]+$/,''); //value = value.replace(/\d/g,''); switch(id) { case 'family_name' : diff --git a/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul b/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul index 318eff9893..55f6c6cf77 100644 --- a/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul +++ b/Open-ILS/xul/staff_client/server/patron/search_form_horiz_overlay.xul @@ -123,6 +123,12 @@ value="&staff.patron_search_form.post_code.label;" accesskey="&staff.patron_search_form.post_code.accesskey;"/> + + +