[rt-users] 'Show Results' link / Query Builder occasionally not working properly

Stuart Browne stuart.browne at ausregistry.com.au
Tue Oct 19 18:10:20 EDT 2010


Applied, tested.  Beautiful.

Thank you Ruslan.

> -----Original Message-----
> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On
> Behalf Of Ruslan Zakirov
> Sent: Tuesday, 19 October 2010 23:05
> To: Stuart Browne
> Cc: rt-users at lists.bestpractical.com
> Subject: Re: [rt-users] 'Show Results' link / Query Builder
> occasionally not working properly
> 
> Hi,
> 
> Issue has been fixed.
> 
> Patch:
> diff --git a/lib/RT/SQL.pm b/lib/RT/SQL.pm
> index 799cf94..946a8ab 100644
> --- a/lib/RT/SQL.pm
> +++ b/lib/RT/SQL.pm
> @@ -68,7 +68,7 @@ my @tokens = qw[VALUE AGGREGATOR OPERATOR OPEN_PAREN
> CLOSE_PAREN KEYWORD];
>  use Regexp::Common qw /delimited/;
>  my $re_aggreg      = qr[(?i:AND|OR)];
>  my $re_delim       = qr[$RE{delimited}{-delim=>qq{\'\"}}];
> -my $re_value       = qr[\d+|NULL|$re_delim];
> +my $re_value       = qr[[+-]?\d+|NULL|$re_delim];
>  my $re_keyword     = qr[[{}\w\.]+|$re_delim];
>  my $re_op          = qr[=|!=|>=|<=|>|<|(?i:IS NOT)|(?i:IS)|(?i:NOT
> LIKE)|(?i:LIKE)]; # long to short
>  my $re_open_paren  = qr[\(];
> 
> 
> SHA: 6c44641cd50c4f3ad631f4cb22292bb37a3c6c97
> 
> On Fri, Oct 15, 2010 at 3:51 AM, Stuart Browne
> <stuart.browne at ausregistry.com.au> wrote:
> > Hi,
> >
> > Running RT 3.8.8 / DBIx::SearchBuilder 1.56, and have noticed some
> strange behaviour with the 'Show Results' link and the Query Builder.
> >
> > From the 'At A Glance' page, I generally click on 'xx highest
> priority tickets I own' to bring up the search result, then click 'Edit
> Search' and add 'Priority > -2' to show only positive value priority
> tickets.  Thus far, all is fine (and I understand I can just alter the
> saved search, but that's not what I want).
> >
> > From there, I use the list, going into and out of tickets, sometimes
> navigating into Configuration or other areas, then click back on
> 'Tickets' and 'Show Results'.  For whatever reason, the search is
> modified to be 'Priority > 2'.
> >
> > Steps to reproduce, and what is shown on the screen:
> >
> >        1. Log In
> >        2. Click on 'xx highest priority tickets I own'
> >        3. Click on 'Edit Search'
> >        4. Use dropdown boxes to add 'Priority' 'greater than' '-2',
> clicked 'Add these items' (or '... and Search')
> >                - At this point, the query is as follows:
> >                        Owner = '__CurrentUser__' AND (  Status =
> 'new' OR Status = 'open'
> >                                OR Status = 'validating' OR Status =
> 'WaitExt' ) AND
> >                                Queue != 'Holding' AND Priority > '-2'
> >        5. Click on any other left-hand menu item
> >        6. Click on 'Tickets'
> >                - Query shown is correct with the '-2' Priority
> >        7. Click on 'Show Results'
> >
> > At this point, the query has changed to:
> >
> >        Owner = '__CurrentUser__' AND (  Status = 'new' OR Status =
> 'open'
> >                OR Status = 'validating' OR Status = 'WaitExt' ) AND
> >                Queue != 'Holding' AND Priority > 2
> >
> > If at step 4, you press 'Add these items' 3 times, it also removes
> the negative.
> >
> > I'm not good enough at the internals of the query builder to know why
> the state of this field changes 'magically', but it didn't happen in
> prior versions.
> >
> > Has anybody else seen this, or can they reproduce the issue? ;)
> >
> > Stuart J. Browne


More information about the rt-users mailing list