[Rt-commit] rt branch, 4.2/user-autocomplete-cfs, updated. rt-4.1.8-417-gbe10207

Alex Vandiver alexmv at bestpractical.com
Wed May 29 16:46:20 EDT 2013


The branch, 4.2/user-autocomplete-cfs has been updated
       via  be10207a1f4dae31e36a3034dfb960bab3473596 (commit)
      from  6af0f52b8c114d6cdd29721e7ed5739e7126aae7 (commit)

Summary of changes:
 etc/RT_Config.pm.in | 4 ++--
 lib/RT/Users.pm     | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit be10207a1f4dae31e36a3034dfb960bab3473596
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed May 29 16:46:15 2013 -0400

    Allow non-braced versions of CF.Name -- the braces are unnecessary here

diff --git a/etc/RT_Config.pm.in b/etc/RT_Config.pm.in
index 60f9d1e..b98de3b 100755
--- a/etc/RT_Config.pm.in
+++ b/etc/RT_Config.pm.in
@@ -1456,8 +1456,8 @@ Used by the User Autocompleter as well as the User Search.
 Specifies which fields of L<RT::User> to match against and how to match
 each field when autocompleting users.  Valid match methods are LIKE,
 STARTSWITH, ENDSWITH, =, and !=.  Valid search fields are the core User
-fields, as well as custom fields, which are specified as "CF.{1234}" or
-"CF.{Name}"
+fields, as well as custom fields, which are specified as "CF.1234" or
+"CF.Name"
 
 =cut
 
diff --git a/lib/RT/Users.pm b/lib/RT/Users.pm
index 36d3e4b..f37f316 100644
--- a/lib/RT/Users.pm
+++ b/lib/RT/Users.pm
@@ -610,8 +610,8 @@ sub SimpleSearch {
         $op = 'STARTSWITH'
         unless $op =~ /^(?:LIKE|(?:START|END)SWITH|=|!=)$/i;
 
-        if ($name =~ /^CF\.\{(.*)}$/) {
-            my $cfname = $1;
+        if ($name =~ /^CF\.(?:\{(.*)}|(.*))$/) {
+            my $cfname = $1 || $2;
             $self->LimitCustomField(
                 CUSTOMFIELD     => $cfname,
                 OPERATOR        => $op,

-----------------------------------------------------------------------


More information about the Rt-commit mailing list