[rt-devel] error by loading an queue

Tina Schade tina.schade at gmx.de
Fri Jan 23 06:20:02 EST 2004


Hello,

I want to load a queue from the database, but it doesn´t work. Can someone 
help me please. I started to lern perl for 2 weeks....

my code:
#! /usr/bin/perl -w

use strict;
# bindet Modul RT::Queue ein und ist Kind der Klasse RT::SearchBuilder
use RT::Queues;
#use RT::ACL;

$RT::SystemUser = 1; # entspricht der Id des RT_System
# I think this is not ok, because $RT::SystemUser is defined in System.pm as 
an object, isn´t it?

# next I want to make a new instance of queue - its empty
my $queue = RT::Queue->new($RT::SystemUser); # neues Objekt Queues anlegen
#my $queue = new RT::Queue($root); # neues Objekt Queues anlegen
print( "neues leeres Objekt $queue angelegt. \n" );

# now I will load a queue from the database by id
my $queueLoad = $queue->Load(3); # Stapel mit id= 3 => Bugs laden
print( "jetzt muesste in $queue was drin stehen und der Name ist: $queue->{ 
'Name' } \n" );

exit(0);

the error:
Can't call method "CaseSensitive" on an undefined value at 
/opt/rt3/lib//RT/Record.pm line 200


thanks,
Tina






More information about the Rt-devel mailing list