[rt-devel] can´t create new queue with perl-script

Tina Schade Tina.Schade at gmx.de
Tue Feb 10 09:13:04 EST 2004


ich changed rt from version rt3.0.6 to rt3.0.8. Now I tried with my old perl 
scripts to create new queues. But it doesn´t work. The script worked with the 
old version of rt.
Have I put more includes in it? Or what goes wrong? I don´t understand where 
my mistake is.

Thanks for help, Tina

Here my code of the script. 

#! /usr/bin/perl -w

use strict;
use lib '/opt/rt3/lib';
use lib '/opt/rt3/etc';

use RT;

#Load RT's config file
# Connect to the database. set up logging

# inlude modules which are a child of RT::SearchBuilder
use RT::Queues;
use RT::CustomFields;

my $queue = RT::Queue->new($RT::SystemUser); # a new queue-instance
print( "neues leeres Objekt $queue angelegt. \n" );

# create a new queue
$queue->Create(Name => 'Bugs', Description => 'alle eingehenden Fälle, die 
eine Fehlfunktion darstellen', CorrespondAddress => 
'bugs-correspond at chili-radiology.com', CommentAddress => 
'bugs-comment at chili-radiology.com', InitialPriority => 10,  FinalPriority => 
20, DefaultDueIn => 20, Disabled => 1);
print( "Queue $queue angelegt. \n" );

my $id = $queue->id();
#here comes an error, which is:Trying to check RT::Queue rights for an 
#unspecified RT::Queue (/opt/rt3/lib/RT/Principal_Overlay.pm:355) -> does I 
#have to put another user then $RT::SystemUser???
print( "id = $id\n" );
my $name = $queue->Name();
print( "Name = $name\n" );


More information about the Rt-devel mailing list