Create Groups & Queues Programatically

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@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@gmail.com

[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)

Read the perldoc for Group_Overlay.pm. What you need to do is described
therein.

– ============================
Tom Lahti
BIT Statement LLC

(425)251-0833 x 117
http://www.bitstatement.net/
– ============================