Error "I don't know about $field yet"

Running this:

#!/usr/bin/perl

use warnings;
use strict;
use lib ‘/usr/local/rt-3.6.3/lib’;
use lib ‘/usr/local/rt-3.6.3/local/lib’;
use RT;
use RT::Tickets;

RT::LoadConfig();
RT::Init();

my $tix = new RT::Tickets(RT::SystemUser);
$tix->Limit(‘Queue = “CustomerCare” and Status = “resolved” and Status = “open”’);

my $timeworked = {};
my %env;

while (my $ticket = $tix->Next) {
my $customer = $ticket->FirstCustomFieldValue(‘Environment’);
unless ($customer) {warn “warning” . $ticket->id. “no profile”; next}
my $transactions = $ticket->Transactions;
while (my $transaction = $transactions->Next) {
next unless ($transaction->TimeTaken);
$timeworked = $env{$transaction->Creator}{$transaction->TimeTaken};
}
}

Gives me this:
[Thu Mar 15 08:16:24 2007] [error]: RestrictionsToClauses: I don’t know about
yet at /usr/local/rt-3.6.3/lib/RT/Tickets_Overlay.pm line 2740.
(/usr/local/rt-3.6.3/lib/RT/Tickets_Overlay.pm:2827)

Does anyone have any insight about how I can fix this?

Mathew

Mathew;
Change your limit statements as follow:

$tix->LimitQueue (VALUE => ‘CustomerCare’);
$tix->LimitStatus (VALUE => ‘open’);
$tix->LimitStatus (VALUE => ‘resolved’);

Try the above and see what happens?

Roy

Mathew Snyder wrote:

FromSQL not Limit
$tix->FromSQL(‘Queue = “CustomerCare” and Status = “resolved” and
Status = “open”’);

But note that ‘Status = “resolved” and Status = “open”’ is wrong
condition, most probably you want '( Status = “resolved” OR Status =
“open” )'On 3/15/07, Mathew Snyder theillien@yahoo.com wrote:

Running this:

#!/usr/bin/perl

use warnings;
use strict;
use lib ‘/usr/local/rt-3.6.3/lib’;
use lib ‘/usr/local/rt-3.6.3/local/lib’;
use RT;
use RT::Tickets;

RT::LoadConfig();
RT::Init();

my $tix = new RT::Tickets(RT::SystemUser);
$tix->Limit(‘Queue = “CustomerCare” and Status = “resolved” and Status = “open”’);

my $timeworked = {};
my %env;

while (my $ticket = $tix->Next) {
my $customer = $ticket->FirstCustomFieldValue(‘Environment’);
unless ($customer) {warn “warning” . $ticket->id. “no profile”; next}
my $transactions = $ticket->Transactions;
while (my $transaction = $transactions->Next) {
next unless ($transaction->TimeTaken);
$timeworked = $env{$transaction->Creator}{$transaction->TimeTaken};
}
}

Gives me this:
[Thu Mar 15 08:16:24 2007] [error]: RestrictionsToClauses: I don’t know about
yet at /usr/local/rt-3.6.3/lib/RT/Tickets_Overlay.pm line 2740.
(/usr/local/rt-3.6.3/lib/RT/Tickets_Overlay.pm:2827)

Does anyone have any insight about how I can fix this?

Mathew

Best regards, Ruslan.

$tix->Limit(‘Queue = “CustomerCare” and Status = “resolved” and Status = “open”’);

$tix->FromSQL(…)