X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fshare%2Fhtml%2FHelpers%2FAutocomplete%2FUsers;h=8f7425f2fd928a27f52fd3c43b9f0014b94b543b;hb=e9e0cf0989259b94d9758eceff448666a2e5a5cc;hp=c2b92c1bfd6f1f9d9c597fe52ce8454144f60076;hpb=aa38c070977cf63365a4d26a3e4a7e5049ad70d0;p=freeside.git diff --git a/rt/share/html/Helpers/Autocomplete/Users b/rt/share/html/Helpers/Autocomplete/Users index c2b92c1bf..8f7425f2f 100644 --- a/rt/share/html/Helpers/Autocomplete/Users +++ b/rt/share/html/Helpers/Autocomplete/Users @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2014 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -111,13 +111,27 @@ while (my ($name, $op) = each %fields) { # Exclude users we don't want foreach (split /\s*,\s*/, $exclude) { - $users->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!='); + $users->Limit(FIELD => 'id', VALUE => $_, OPERATOR => '!=', ENTRYAGGREGATOR => 'AND'); } my @suggestions; -$users->Limit( FIELD => $return, OPERATOR => '!=', VALUE => '' ); -$users->Limit( FIELD => $return, OPERATOR => 'IS NOT', VALUE => 'NULL', ENTRYAGGREGATOR => 'AND' ); +if ( RT->Config->Get('DatabaseType') eq 'Oracle' ) { + $users->Limit( + FIELD => $return, + OPERATOR => 'IS NOT', + VALUE => 'NULL', + ); +} +else { + $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 @@ -125,7 +139,7 @@ while ( my $user = $users->Next ) { my $formatted = $m->scomp('/Elements/ShowUser', User => $user, NoEscape => 1); $formatted =~ s/\n//g; - my $suggestion = { label => $formatted, value => $user->$return }; + my $suggestion = { label => $formatted, value => $user->$return, id => $user->id }; $m->callback( CallbackName => "ModifySuggestion", suggestion => $suggestion, user => $user ); push @suggestions, $suggestion; }