Blank OrderBy entries causing query to fail - 3.6.3

On my rt 3.6.3 install, I’m experiencing a problem where when performing
a ticket search, if all 4 OrderBy fields are not filled in, and the ‘Add
and Search’ button is pressed (submitting it to Build.html), the count
of tickets displays correctly but no tickets are displayed in the list.

The rt.log confirms that the query passed to mysql is invalid.

Fri Feb 9 15:54:45 2007] [warning]: DBD::mysql::st execute failed: You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near ‘| ASC,
main.id DESC LIMIT 50’ at line 1 at
/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm line 50
5. (/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm:505)
[Fri Feb 9 15:54:45 2007] [warning]: RT::Handle=HASH(0x863734e4)
couldn’t execute the query ‘SELECT main.* FROM Tickets main WHERE
((main.EffectiveId = main.id)) AND ((main.Status != ‘deleted’)) AND
((main.Type = ‘ticket’)) AND ((main.Queue = ‘7’) AND ( (main.Status !=
‘rejected’) AND (main.Status != ‘deleted’) AND (main.Status !=
‘resolved’) ) ) ORDER BY main.id||| ASC, main.id DESC LIMIT 50’ at
/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm line 518

The same query works fine from the ‘Show Results’ link at the top that
submits to Results.html, as do Results.tsv and rdf.

Can anyone else confirm this is happening to them?

Thanks,
Ryan

rfox.vcf (276 Bytes)

I’ve checked 3.6.HEAD and there is no way to select [none] in the
first order by select box.On 2/9/07, Ryan Fox rfox@findlay.edu wrote:

On my rt 3.6.3 install, I’m experiencing a problem where when performing
a ticket search, if all 4 OrderBy fields are not filled in, and the ‘Add
and Search’ button is pressed (submitting it to Build.html), the count
of tickets displays correctly but no tickets are displayed in the list.

The rt.log confirms that the query passed to mysql is invalid.

Fri Feb 9 15:54:45 2007] [warning]: DBD::mysql::st execute failed: You
have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near ‘| ASC,
main.id DESC LIMIT 50’ at line 1 at
/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm line 50
5. (/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm:505)
[Fri Feb 9 15:54:45 2007] [warning]: RT::Handle=HASH(0x863734e4)
couldn’t execute the query ‘SELECT main.* FROM Tickets main WHERE
((main.EffectiveId = main.id)) AND ((main.Status != ‘deleted’)) AND
((main.Type = ‘ticket’)) AND ((main.Queue = ‘7’) AND ( (main.Status !=
‘rejected’) AND (main.Status != ‘deleted’) AND (main.Status !=
‘resolved’) ) ) ORDER BY main.id||| ASC, main.id DESC LIMIT 50’ at
/usr/local/libdata/perl5/site_perl/DBIx/SearchBuilder/Handle.pm line 518

The same query works fine from the ‘Show Results’ link at the top that
submits to Results.html, as do Results.tsv and rdf.

Can anyone else confirm this is happening to them?

Thanks,
Ryan


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Best regards, Ruslan.