[rt-users] Create Groups & Queues Programatically

Eliezer E Chávez eliezer.chavez at gmail.com
Fri Apr 17 12:01:59 EDT 2009


Dear Pals

I'm trying to create groups in my rt instance by a perl script, this is the
script:

#!/opt/perl/bin/perl
use lib "$ENV{'RTHOME'}/lib";
use lib "$ENV{'RTHOME'}/local/plugins/RT-FM/lib";
use strict;
use RT::Interface::CLI qw(CleanEnv);
use RT::Group;

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

my $group = RT::Group->new($RT::SystemUser);
my ($id)  = $group->Create(
    Name         => "$ARGV[0]",
    Description  => "$ARGV[1]",
);
print "Group id: $id\n";

But keeps telling me this:

[as10g at aspccs11 ~/bin]$ ./rt-addgroup.pl CAR "Coordinación Almacenamiento y
Respaldo"
[Fri Apr 17 15:59:11 2009] [crit]: Someone called RT::Group->Create. this
method does not exist. someone's being evil
(/opt/rt/lib/RT/Group_Overlay.pm:387)
Group id: 0

So, what i'm doing wrong.

Thanks in advance pals!

-- 
Eliezer E Chávez
+58-416-6125676
eliezer.chavez at gmail.com
>>http://www.bumeran.com.ve/cv/eliezer-chavez
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bestpractical.com/pipermail/rt-users/attachments/20090417/4603d268/attachment.htm>


More information about the rt-users mailing list