X-Git-Url: http://git.uio.no/git/?p=usit-rt.git;a=blobdiff_plain;f=lib%2FRT%2FInterface%2FWeb%2FQueryBuilder%2FTree.pm;h=cd68ea175c73fe53b6119cc93a33453fdcf55a29;hp=2cfc8899801c1d91fc944e4d93dd941533033a85;hb=af59614dbbf895bf0b0ab155fe158b6152edf32b;hpb=b5747ff2520f421155a12155049117a9a2a67fe5 diff --git a/lib/RT/Interface/Web/QueryBuilder/Tree.pm b/lib/RT/Interface/Web/QueryBuilder/Tree.pm index 2cfc889..cd68ea1 100644 --- a/lib/RT/Interface/Web/QueryBuilder/Tree.pm +++ b/lib/RT/Interface/Web/QueryBuilder/Tree.pm @@ -2,7 +2,7 @@ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2012 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -113,9 +113,7 @@ sub GetReferencedQueues { return unless $clause->{Key} eq 'Queue'; return unless $clause->{Op} eq '='; - my $value = $clause->{Value}; - $value =~ s/\\(.)/$1/g if $value =~ s/^'(.*)'$/$1/; - $queues->{ $value } = 1; + $queues->{ $clause->{RawValue} } = 1; } ); @@ -257,6 +255,7 @@ sub ParseSQL { $callback{'EntryAggregator'} = sub { $node->setNodeValue( $_[0] ) }; $callback{'Condition'} = sub { my ($key, $op, $value) = @_; + my $rawvalue = $value; my ($main_key) = split /[.]/, $key; @@ -281,7 +280,7 @@ sub ParseSQL { $key = "'$key'"; } - my $clause = { Key => $key, Op => $op, Value => $value }; + my $clause = { Key => $key, Op => $op, Value => $value, RawValue => $rawvalue }; $node->addChild( __PACKAGE__->new( $clause ) ); }; $callback{'Error'} = sub { push @results, @_ };