[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-108-g08f4e18
Ruslan Zakirov
ruz at bestpractical.com
Fri Jan 29 13:53:59 EST 2010
The branch, 3.8-trunk has been updated
via 08f4e1825d52f25a179ba12a9582244fb927493b (commit)
via fad2fe7a448c0838948ddc70a3588cecb98d5d6d (commit)
from fcb3e2cc432cfd60594702016139909c2e906ba1 (commit)
Summary of changes:
lib/RT/Interface/Web/QueryBuilder/Tree.pm | 6 +++++-
share/html/Widgets/Form/Select | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
- Log -----------------------------------------------------------------
commit fad2fe7a448c0838948ddc70a3588cecb98d5d6d
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Jan 29 21:40:41 2010 +0300
grep defined values out DefaultValue array
diff --git a/share/html/Widgets/Form/Select b/share/html/Widgets/Form/Select
index e778617..4587f1d 100644
--- a/share/html/Widgets/Form/Select
+++ b/share/html/Widgets/Form/Select
@@ -117,7 +117,10 @@ if ( $ValuesCallback ) {
}
}
unless (defined $DefaultLabel ) {
- $DefaultLabel = loc('Use system default ([_1])', join ', ', map{ loc($ValuesLabel{$_} || $_) } @DefaultValue);
+ $DefaultLabel = loc('Use system default ([_1])',
+ join ', ', map loc($ValuesLabel{$_} || $_), grep defined,
+ @DefaultValue
+ );
}
</%INIT>
</%METHOD>
commit 08f4e1825d52f25a179ba12a9582244fb927493b
Author: Ruslan Zakirov <ruz at bestpractical.com>
Date: Fri Jan 29 21:43:43 2010 +0300
fix query builder behaviour with NULLs and '' (empty values)
yes, there is no way to add IS NULL or empty value condition
in the query builder, but there is Advanced in the menu and
many extensions.
diff --git a/lib/RT/Interface/Web/QueryBuilder/Tree.pm b/lib/RT/Interface/Web/QueryBuilder/Tree.pm
index 574ead4..e672d8e 100755
--- a/lib/RT/Interface/Web/QueryBuilder/Tree.pm
+++ b/lib/RT/Interface/Web/QueryBuilder/Tree.pm
@@ -268,7 +268,11 @@ sub ParseSQL {
}
$value =~ s/'/\\'/g;
- $value = "'$value'" if $value =~ /[^0-9]/;
+ if ( lc $op eq 'is' || lc $op eq 'is not' ) {
+ $value = 'NULL'; # just fix possible mistakes here
+ } elsif ( $value !~ /^[+-]?[0-9]+$/ ) {
+ $value = "'$value'";
+ }
$key = "'$key'" if $key =~ /^CF./;
my $clause = { Key => $key, Op => $op, Value => $value };
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list