[Rt-commit] rt branch, 4.0/user-autocomplete-oracle-fix, created. rt-4.0.7-62-gdeba89e
? sunnavy
sunnavy at bestpractical.com
Tue Oct 2 09:29:32 EDT 2012
The branch, 4.0/user-autocomplete-oracle-fix has been created
at deba89e24e13ec34ccdd7fab9c557144e1fd8b94 (commit)
- Log -----------------------------------------------------------------
commit deba89e24e13ec34ccdd7fab9c557144e1fd8b94
Author: sunnavy <sunnavy at bestpractical.com>
Date: Tue Oct 2 21:24:45 2012 +0800
fix user autocomplete for oracle because it treats empty string as NULL
see also #20873
diff --git a/share/html/Helpers/Autocomplete/Users b/share/html/Helpers/Autocomplete/Users
index c2b92c1..c3722a0 100644
--- a/share/html/Helpers/Autocomplete/Users
+++ b/share/html/Helpers/Autocomplete/Users
@@ -116,8 +116,22 @@ foreach (split /\s*,\s*/, $exclude) {
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
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list