Rt CLI and custom fields when creating tickets

Hi,

I’m trying to create a simple script to automatically create around 300
tickets in RT (currently running 3.0.9). Each ticket represents one
computer that needs to be replaced and the ticket will need to have some
custom fields set that indicate the department getting the system, what
type of system it is, etc. I’m planning on using Perl to feed data to
the rt executable. A simple test creation of a ticket without the
custom fields works properly:

rt create -i -t ticket <rt/ticket.tmpl

where ticket.tmpl is:

id: ticket/new
Queue: Lease
Requestor: dawsons
Cc:
AdminCc:
Owner:
Status: new
Priority: 11
InitialPriority: 11
FinalPriority: 20
TimeEstimated: 0
Starts: 2004-06-08 20:43:06
Due: 2004-06-08 20:43:06
Text: this ticket was created via the RT command line interface and is
just a test ticket to see how rt handles things.

If I add lines for the custom fields to end of ticket.tmpl the rt
executable seems to have no problems, as adding -o to the command line
gives me the expected output, but the ticket is created without the
custom fields and I get back something like:

dawsons@fenris:~$ rt create -i -t ticket <rt/ticket.tmpl

Ticket 227 created.

department: Unknown field.

replacement: Unknown field.

lfc: Unknown field.

id: ticket/new
TimeEstimated:
Cc:
Queue: Lease
Text: this ticket was created via the RT command line interface and is
just a test ticket to see how rt handles things.
Owner:
InitialPriority: 11
LFC: Chris
dawsons@fenris:~$

The additional lines in ticket.tmpl for the custom fields are:

Department: Information Technology
LFC: Chris
Replacement: e4100

Should I be poking around in html/REST/1.0/Forms/ticket/default for my
answers as to why this isn’t working? It looks like the fields that are
acceptable is hard-coded here and the queue in question isn’t queried
for any custom fields. Is it even possible to add initial values for
custom fields via the rt executable or should I be looking at some other
method for creating my tickets?

Any help would be greatly appreciated.

-Paul Schmidt
dawsons@augsburg.edu

At 12:20 PM 6/9/2004, Paul Schmidt wrote:

The additional lines in ticket.tmpl for the custom fields are:

Department: Information Technology
LFC: Chris
Replacement: e4100

Take a look at the documentation for Ticket_Overlay.pm. The template format
is described in there. It explains how to use the custom field number to
insert those values.

Michael

Michael S. Liebman m-liebman@northwestern.edu
http://msl521.freeshell.org/
“I have vision and the rest of the world wears bifocals.”
-Paul Newman in “Butch Cassidy & the Sundance Kid”