[Rt-commit] rt branch, 4.0/skip-empty-values-in-email-completion, updated. rt-4.0.5-118-gc3238f0
? sunnavy
sunnavy at bestpractical.com
Sun Apr 15 22:11:35 EDT 2012
The branch, 4.0/skip-empty-values-in-email-completion has been updated
via c3238f0a15237a0d1bb4a4903e280337e5b9a08d (commit)
from 3c678fc8928385d36fded38eea6ee392b06ae647 (commit)
Summary of changes:
share/html/Helpers/Autocomplete/Users | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit c3238f0a15237a0d1bb4a4903e280337e5b9a08d
Author: sunnavy <sunnavy at bestpractical.com>
Date: Mon Apr 16 10:10:30 2012 +0800
we can/should filter empty values in sql instead
diff --git a/share/html/Helpers/Autocomplete/Users b/share/html/Helpers/Autocomplete/Users
index d1dc69a..c2b92c1 100644
--- a/share/html/Helpers/Autocomplete/Users
+++ b/share/html/Helpers/Autocomplete/Users
@@ -116,12 +116,13 @@ foreach (split /\s*,\s*/, $exclude) {
my @suggestions;
+$users->Limit( FIELD => $return, OPERATOR => '!=', VALUE => '' );
+$users->Limit( FIELD => $return, OPERATOR => 'IS NOT', VALUE => 'NULL', ENTRYAGGREGATOR => 'AND' );
+
while ( my $user = $users->Next ) {
next if $user->id == RT->SystemUser->id
or $user->id == RT->Nobody->id;
- next unless defined $user->$return && length $user->$return;
-
my $formatted = $m->scomp('/Elements/ShowUser', User => $user, NoEscape => 1);
$formatted =~ s/\n//g;
my $suggestion = { label => $formatted, value => $user->$return };
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list