%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-2015 Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
# 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;
+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
or $user->id == RT->Nobody->id;
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;
}