Help with CLI

To List,

Has anyone out there use CLI for RT? I'm trying it and getting nowhere, 

fast. I need some help, if anyone is able and willing. Thanks.

Kenn
LBNL

We are using it heavily… What kind of infos you need?

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael Kühne-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com rt-users-bounces@lists.bestpractical.com
To: rt Users rt-users@lists.bestpractical.com
Sent: Thu Jul 10 21:42:46 2008
Subject: [rt-users] Help with CLI

To List,

Has anyone out there use CLI for RT? I'm trying it and getting nowhere, 

fast. I need some help, if anyone is able and willing. Thanks.

Kenn
LBNL

http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Torsten,

Hope I got your name right. I have thousands of tickets I need to 

convert from one system to RT. I have developed my DataMap. I’m planning
on running an SQL against the old system DB and then within that SQL,
for every record read, create a new RT ticket using CLI. So, the first
thing I wanted to do was try out the commands to get an understanding of
how they worked, etc. I brought RT up in my Dev environment and then
signed in UNIX on that server and tried out a CLI command and it
responded with

bash-2.03$ pwd
/apps/rt
bash-2.03$ rt list “status=‘new’”;
bash: rt: command not found

So, I'm trying to figure out why it won't recognise my command. Not 

EVER having done this before, I’m currently looking at $RTHOME/bin/ and
in the “rt” file I read some stuff about configuration being “hardwired
default” and such. I’m really foggy on all of that. Can I assume
(horrible word) that I have to modify file “rt” in $RTHOME/bin with a
bunch of session settings or something? Any and ALL help at this point
is GREATLY appreciated.

Kenn
LBNLOn 7/10/2008 12:51 PM, Ham MI-ID, Torsten Brumm wrote:

We are using it heavily… What kind of infos you need?

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
rt-users-bounces@lists.bestpractical.com
To: rt Users rt-users@lists.bestpractical.com
Sent: Thu Jul 10 21:42:46 2008
Subject: [rt-users] Help with CLI

To List,

    Has anyone out there use CLI for RT? I'm trying it and getting 

nowhere,
fast. I need some help, if anyone is able and willing. Thanks.

Kenn
LBNL


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
(Vors.), Uwe Bielang (Stellv.), Dirk Blesius (Stellv.), Bruno Mang,
Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.),
Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA
21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne
& Nagel A.G., Sitz: Contern/Luxemburg, Geschäftsführender
Verwaltungsrat: Klaus-Michael Kühne

Hi Kenneth,

bash-2.03$ pwd
/apps/rt
bash-2.03$ rt list “status=‘new’”;
bash: rt: command not found

It looks like the directory containing “rt” is not in your PATH. The
laziest fix is to just specify the full path to the rt program:

$ /apps/rt/bin/rt list status=‘new’

Shawn

Shawn,

Thanks! That worked! Although now it wants a password so I have to go 

find one.
Question: will I be able to embed a CLI command that creates a new
record and sets values for the fields within an SQL without it wanting a
password every time? I hope so. Otherwise I won’t be able to walk thru
the old database and create new tickets in the new DB. Doing this one at
a time is not gonna do at all.

Kenn
LBNLOn 7/10/2008 2:24 PM, Shawn M Moore wrote:

On Thu, Jul 10, 2008 at 02:09:43PM -0700, Kenneth Crocker wrote:

Hi Kenneth,

bash-2.03$ pwd
/apps/rt
bash-2.03$ rt list “status=‘new’”;
bash: rt: command not found

It looks like the directory containing “rt” is not in your PATH. The
laziest fix is to just specify the full path to the rt program:

$ /apps/rt/bin/rt list status=‘new’

Shawn

You can set the password and user settings as a shell variable or a .rtrc file, look at the wiki, it is explained good.

More answers tomorrow, it’s midnight here :wink:

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann (Vors.), Uwe Bielang (Stellv.), Bruno Mang, Dirk Blesius (Stellv.), Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.), Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA 21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne & Nagel A.G., Sitz: Contern/Luxemburg Geschäftsführender Verwaltungsrat: Klaus-Michael KühneFrom: rt-users-bounces@lists.bestpractical.com rt-users-bounces@lists.bestpractical.com
To: Shawn M Moore sartak@bestpractical.com
CC: rt-users@lists.bestpractical.com rt-users@lists.bestpractical.com
Sent: Thu Jul 10 23:54:29 2008
Subject: Re: [rt-users] Help with CLI

Shawn,

Thanks! That worked! Although now it wants a password so I have to go 

find one.
Question: will I be able to embed a CLI command that creates a new
record and sets values for the fields within an SQL without it wanting a
password every time? I hope so. Otherwise I won’t be able to walk thru
the old database and create new tickets in the new DB. Doing this one at
a time is not gonna do at all.

Kenn
LBNL

Torsten,

Midnight! Man, you ARE far away. Thanks for the info. I'll check out 

the wiki so I won’t sound so ignorant as I continue to flounder about.
Thanks a lot.

Kenn
LBNLOn 7/10/2008 2:58 PM, Ham MI-ID, Torsten Brumm wrote:

You can set the password and user settings as a shell variable or a
.rtrc file, look at the wiki, it is explained good.

More answers tomorrow, it’s midnight here :wink:

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
rt-users-bounces@lists.bestpractical.com
To: Shawn M Moore sartak@bestpractical.com
CC: rt-users@lists.bestpractical.com rt-users@lists.bestpractical.com
Sent: Thu Jul 10 23:54:29 2008
Subject: Re: [rt-users] Help with CLI

Shawn,

    Thanks! That worked! Although now it wants a password so I have 

to go
find one.
Question: will I be able to embed a CLI command that creates a new
record and sets values for the fields within an SQL without it wanting a
password every time? I hope so. Otherwise I won’t be able to walk thru
the old database and create new tickets in the new DB. Doing this one at
a time is not gonna do at all.

Kenn
LBNL

On 7/10/2008 2:24 PM, Shawn M Moore wrote:

On Thu, Jul 10, 2008 at 02:09:43PM -0700, Kenneth Crocker wrote:

Hi Kenneth,

bash-2.03$ pwd
/apps/rt
bash-2.03$ rt list “status=‘new’”;
bash: rt: command not found

It looks like the directory containing “rt” is not in your PATH. The
laziest fix is to just specify the full path to the rt program:

$ /apps/rt/bin/rt list status=‘new’

Shawn


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
(Vors.), Uwe Bielang (Stellv.), Dirk Blesius (Stellv.), Bruno Mang,
Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.),
Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA
21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne
& Nagel A.G., Sitz: Contern/Luxemburg, Geschäftsführender
Verwaltungsrat: Klaus-Michael Kühne

Torsten,

Hey, I got it up without the error of not recognizing the command. I 

tried Shawn’s suggestion and keyed in the following:

Export RTUSER=My LDAP User name
Export RTPASSWD=My LDAP password
Export RTSERVER=My Dev server
/apps/rt/rt-3.6.6/bin/rt

At that point, I got the RT prompt. Now all I need to do is try some RT 

“Create” commands to see if I can actually create a ticket using CLI.
Then I need to do several at a time and then within a SQL that is in a
shell.
Do you have any examples of CLI that create new tickets? Several in a row?
I appreciate. Thanks a lot.

Kenn
LBNLOn 7/10/2008 2:58 PM, Ham MI-ID, Torsten Brumm wrote:

You can set the password and user settings as a shell variable or a
.rtrc file, look at the wiki, it is explained good.

More answers tomorrow, it’s midnight here :wink:

-----Original Message-----
From: rt-users-bounces@lists.bestpractical.com
rt-users-bounces@lists.bestpractical.com
To: Shawn M Moore sartak@bestpractical.com
CC: rt-users@lists.bestpractical.com rt-users@lists.bestpractical.com
Sent: Thu Jul 10 23:54:29 2008
Subject: Re: [rt-users] Help with CLI

Shawn,

    Thanks! That worked! Although now it wants a password so I have 

to go
find one.
Question: will I be able to embed a CLI command that creates a new
record and sets values for the fields within an SQL without it wanting a
password every time? I hope so. Otherwise I won’t be able to walk thru
the old database and create new tickets in the new DB. Doing this one at
a time is not gonna do at all.

Kenn
LBNL

On 7/10/2008 2:24 PM, Shawn M Moore wrote:

On Thu, Jul 10, 2008 at 02:09:43PM -0700, Kenneth Crocker wrote:

Hi Kenneth,

bash-2.03$ pwd
/apps/rt
bash-2.03$ rt list “status=‘new’”;
bash: rt: command not found

It looks like the directory containing “rt” is not in your PATH. The
laziest fix is to just specify the full path to the rt program:

$ /apps/rt/bin/rt list status=‘new’

Shawn


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

Kühne + Nagel (AG & Co.) KG, Geschäftsleitung: Hans-Georg Brinkmann
(Vors.), Uwe Bielang (Stellv.), Dirk Blesius (Stellv.), Bruno Mang,
Alfred Manke, Christian Marnetté (Stellv.), Mark Reinhardt (Stellv.),
Jens Wollesen, Rainer Wunn, Sitz: Bremen, Registergericht: Bremen, HRA
21928, USt-IdNr.: DE 812773878, Persönlich haftende Gesellschaft: Kühne
& Nagel A.G., Sitz: Contern/Luxemburg, Geschäftsführender
Verwaltungsrat: Klaus-Michael Kühne