[Rt-commit] rt branch, 4.4/autocomplete-users-modify-term-callback, created. rt-4.4.4-45-ga95de677a

? sunnavy sunnavy at bestpractical.com
Fri Jun 21 16:11:46 EDT 2019


The branch, 4.4/autocomplete-users-modify-term-callback has been created
        at  a95de677aef7a5b12b92409ad140b30d939b4a7f (commit)

- Log -----------------------------------------------------------------
commit a95de677aef7a5b12b92409ad140b30d939b4a7f
Author: sunnavy <sunnavy at bestpractical.com>
Date:   Sat Jun 22 03:17:53 2019 +0800

    Add ModifyTerm callback to Users autocomplete
    
    With this, people can pre-process term easily, e.g. to replace spaces
    with '%' to get more loose results.

diff --git a/share/html/Helpers/Autocomplete/Users b/share/html/Helpers/Autocomplete/Users
index bcb5d0ab3..fe8aa0358 100644
--- a/share/html/Helpers/Autocomplete/Users
+++ b/share/html/Helpers/Autocomplete/Users
@@ -94,6 +94,8 @@ push @exclude, RT->Nobody->id unless $include_nobody;
 $m->callback( CallbackName => 'ModifyMaxResults', max => \$max );
 $max //= 10;
 
+$m->callback( CallbackName => 'ModifyTerm', term => \$term );
+
 my $users = RT::Users->new($CurrentUser);
 $users->SimpleSearch( Privileged => $privileged,
                       Return     => $return,

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


More information about the rt-commit mailing list