RT 3.4.0 rc's not completing search queries oncustomfields?

As of 3.4.0 rc2, there’s no schema.SQLite in etc/upgrade that would have
made this change. (Although it does appear to be created correctly if
you’re starting from scratch.)

MarkR

[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of Jesse
VincentSent: Friday, January 07, 2005 11:15 AM
To: Roedel, Mark
Cc: rt-bugs@fsck.com; rt-users@lists.bestpractical.com; David Snyder
Subject: Re: [rt-users] RT 3.4.0 rc’s not completing search queries
oncustomfields?

Looks like ObjectCustomFieldValues is the correct table name. (It’s
renamed from TicketCustomFieldValues in the upgrade schema files in
etc/upgrade/3.3.0 for mysql, pgsql and Oracle.) I wonder why the same
change wasn’t made for the other supported databases?

The change should have been made for every supported database. SQLite,
MySQL, Postgresql and Oracle.


MarkR

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
[mailto:rt-users-bounces@lists.bestpractical.com] On Behalf Of David
Snyder
Sent: Friday, January 07, 2005 10:34 AM
To: rt-users@lists.bestpractical.com
Cc: rt-bugs@fsck.com
Subject: Re: [rt-users] RT 3.4.0 rc’s not completing search queries on
customfields?

From my apache error log when I try to search on a Ticket Custom
Field:
[Fri Jan 07 11:15:26 2005] [error] [client 130.132.101.242] FastCGI:
server “/opt/rt3.4/bin/mason_handler.fcgi” stderr: DBD::mysql::st
execute failed: Table ‘rt34.TicketCustomFieldValues’ doesn’t exist at
/usr/local/perl-5.8.5/lib/site_perl/5.8.5/DBIx/SearchBuilder/Handle.pm

line 475., referer:

http://fasit-rhel1.its.yale.edu/rt3.4/Search/Edit.html?Order=ASC&Query=%

20’CF.%7BType%7D’%20%3D%20’problem’%20&Rows=50&OrderBy=id&Format='%20%20

%20%3Cb%3E%3Ca%20href%3D%22%2Frt3.4%2FTicket%2FDisplay.html%3Fid%3D__id_

%22%3E__id_%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23’%2C%0A’%3Cb%3E%3Ca%20hre

f%3D%22%2Frt3.4%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3

C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject’%2C%0A’Status’%2C%0A’__QueueNam

e__‘%2C%0A’OwnerName’%2C%0A’Priority’%2C%0A’NEWLINE’%2C%0A’’

%2C%0A’%3Csmall%3E__Requestors__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__Creat

edRelative__%3C%2Fsmall%3E’%2C%0A’%3Csmall%3E__ToldRelative__%3C%2Fsmall

%3E’%2C%0A’%3Csmall%3E__LastUpdatedRelative__%3C%2Fsmall%3E’%2C%0A’%3Csm

all%3E__TimeLeft__%3C%2Fsmall%3E’

I found that the TicketCustomFieldValues is not defined in
schema.mysql,

only in schema.Informix and schema.Sybase. Also, mysql, Oracle, Pg,

and SQLite have and ObjectCustomFieldValues tables, where Informix and

Sybase do not. I’m not smart enought to figure out which is right
though, or how to translate from Informix or Sybase syntax to mysql to

create the table.

David


The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com


The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Be sure to check out the RT wiki at http://wiki.bestpractical.com

As of 3.4.0 rc2, there’s no schema.SQLite in etc/upgrade that would have
made this change. (Although it does appear to be created correctly if
you’re starting from scratch.)

I’ve not yet found a single site using SQLite for anything other than
testing/development hacking and SQLite doesn’t support ALTER TABLE. You
need to jump through much smaller hoops to make it go. If anyone is
using SQLite in production and needs help upgrading, I’d be happy to
work with you to prepare the script.

Makes sense…just wanted to make sure it got mentioned in case that was
just some sort of oversight.

Thanks a bunch for your help, and for the quick resolution Jesse. I’ll
plan on grabbing rc3 this afternoon.

MarkRFrom: Jesse Vincent [mailto:jesse@bestpractical.com]
Sent: Friday, January 07, 2005 11:35 AM
To: Roedel, Mark
Cc: Jesse Vincent; rt-users@lists.bestpractical.com; David Snyder
Subject: Re: [rt-users] RT 3.4.0 rc’s not completing search queries
oncustomfields?

As of 3.4.0 rc2, there’s no schema.SQLite in etc/upgrade that would
have
made this change. (Although it does appear to be created correctly if
you’re starting from scratch.)

I’ve not yet found a single site using SQLite for anything other than
testing/development hacking and SQLite doesn’t support ALTER TABLE. You
need to jump through much smaller hoops to make it go. If anyone is
using SQLite in production and needs help upgrading, I’d be happy to
work with you to prepare the script.

Attached is a patch for Tickets_Overlay.pm which seems to correct the
behavior of searching on Ticket Custom Fields.

David

Tickets_Overlay.pm.txt (168 Bytes)

There’s actually a bit more to it than that. You need to make sure that
you’re actually limiting only to cfs on objects of type ticket.On Fri, Jan 07, 2005 at 12:46:04PM -0500, David Snyder wrote:

Attached is a patch for Tickets_Overlay.pm which seems to correct the
behavior of searching on Ticket Custom Fields.

David

874,875c874,875
< TABLE2 => ‘TicketCustomFieldValues’,
< FIELD2 => ‘Ticket’ );

     TABLE2 => 'ObjectCustomFieldValues',
     FIELD2 => 'ObjectId' );

OK. Here’s a second attempt, which seems to be working (in my limited
testing on a DB with 2 tickets :slight_smile:

This is the best I can do I’m afraid.

David

Tickets_Overlay.pm.txt (394 Bytes)

I’m not using it in production, but I have been thinking a lot
about a self-contained PAR usijng SQLite and standalone_httpd
for instances when a personal (or really small workgroup) RT
could be handy.On Fri, Jan 07, 2005 at 12:34:47PM -0500, Jesse Vincent wrote:

On Fri, Jan 07, 2005 at 11:17:50AM -0600, Roedel, Mark wrote:

As of 3.4.0 rc2, there’s no schema.SQLite in etc/upgrade that would have
made this change. (Although it does appear to be created correctly if
you’re starting from scratch.)

I’ve not yet found a single site using SQLite for anything other than
testing/development hacking and SQLite doesn’t support ALTER TABLE. You
need to jump through much smaller hoops to make it go. If anyone is
using SQLite in production and needs help upgrading, I’d be happy to
work with you to prepare the script.


The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com

I’m not using it in production, but I have been thinking a lot
about a self-contained PAR usijng SQLite and standalone_httpd
for instances when a personal (or really small workgroup) RT
could be handy.

You’re not the only one. That’s actually why I did the port to SQLite
and standalone_httpd in the first place. We’ve been working toward that
very goal.> On Fri, Jan 07, 2005 at 12:34:47PM -0500, Jesse Vincent wrote:

On Fri, Jan 07, 2005 at 11:17:50AM -0600, Roedel, Mark wrote:

As of 3.4.0 rc2, there’s no schema.SQLite in etc/upgrade that would have
made this change. (Although it does appear to be created correctly if
you’re starting from scratch.)

I’ve not yet found a single site using SQLite for anything other than
testing/development hacking and SQLite doesn’t support ALTER TABLE. You
need to jump through much smaller hoops to make it go. If anyone is
using SQLite in production and needs help upgrading, I’d be happy to
work with you to prepare the script.


The rt-users Archives

Be sure to check out the RT wiki at http://wiki.bestpractical.com

There’s actually a bit more to it than that. You need to make sure that
you’re actually limiting only to cfs on objects of type ticket.

And looking into it in more detail, All of commit 1967 was in error. It
was a really bogus merge. And the fact that no tests are failing means
we’re missing coverage. Once I spend a bit of my evening doing
something more enjoyable than coding, I’ll get this fixed up.

Jesse